Code Monkey home page Code Monkey logo

chess's People

Watchers

 avatar  avatar

Forkers

erohkohl

chess's Issues

Try to escape from checkmate does not work

no check-mate, move: K: ([i:0,j:4])->([i:1,j:3]) possible!
    a   b   c   d   e   f   g   h
8   T   S   L   D   K   L   S   T   8
7   .   .   B   .   B   D   B   B   7
6   B   B   .   B   .   .   .   .   6
5   .   .   .   .   .   .   .   .   5
4   .   .   L   .   .   .   .   .   4
3   .   .   .   .   B   .   .   .   3
2   B   B   B   B   .   B   B   B   2
1   T   S   L   .   K   .   S   T   1
    a   b   c   d   e   f   g   h

choose: 4
choose: 11
    a   b   c   d   e   f   g   h
8   T   S   L   D   K   L   S   T   8
7   .   .   B   .   B   D   B   B   7
6   B   B   .   B   .   .   .   .   6
5   .   .   .   .   .   .   .   .   5
4   .   .   L   .   .   .   .   .   4
3   .   .   .   .   B   .   .   .   3
2   B   B   B   B   .   B   B   B   2
1   T   S   L   .   K   .   S   T   1
    a   b   c   d   e   f   g   h

[i:0,j:4]
Move:e8,d7
([i:0,j:4])->([i:1,j:3])
If you do that, your king will be chess.
Please try again!

Refactor God-Class Chess

Die Schachklasse soll das Schachspiel orchestrieren, nicht mehr.

Was soll raus:

  • Data Model (turnValid, chessTurns, checkMate)
  • Validierung des Spielzugs (Spielzug-Ende, ob der Zug möglich ist, ob der Gegner nach dem Zug Schach ist)
  • Board-Printing

Was bleibt drin:

  • CommandParser

Resolve the: no valid attack move bug

Move:d7,b5
([i:1,j:3])->([i:3,j:1])
If you do that, your king will be chess.
Please try again!
	a	b	c	d	e	f	g	h
8	T	S	L	.	K	L	S	T	8
7	B	B	B	D	B	B	B	B	7
6	.	.	.	B	.	.	.	.	6
5	.	L	.	.	.	.	.	.	5
4	.	.	.	.	.	.	.	.	4
3	.	.	.	.	B	D	.	.	3
2	B	B	B	B	.	B	B	B	2
1	T	S	L	.	K	.	S	T	1
	a	b	c	d	e	f	g	h

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.