polish-draughts-java-b-t-nd's People
polish-draughts-java-b-t-nd's Issues
Create pawns
Pawns are created and placed on every other field when the board is initialized. Their number is determined by board size, as a 2 * n.
bugfix: pice moving to last line
fix, when piece reaches the last row
create playRound()
There is a method playRound() that determines one-round actions that is, checks which player is next and whether there is a winner.
[extra] check for multiple jumps
[Extra] The Pawn class can check if the pawn can make multiple jumps according to the rules.
[extra] isCrowned
[Extra] There is boolean isCrowned field that returns true if a pawn is crowned.
create tryToMakeMove()
There is a method that checks if the starting position from user input is a valid pawn and if the ending position is within board boundaries. If so, it calls tryToMakeMove() on pawn instance.
validate pawn moves
The Pawn class contains a method that validates the move (whether it is within the game rules) before it is performed.
create checkForWinner()
There is a checkForWinner() method that checks whether there is a winner after each round.
determine OS
create class for Coordinates
There is a field of the Coordinates position class that represents pawn coordinates on a board. The Coordinates class has two fields, Integer x and Integer y.
bugfix: white and black pieces, OS depenent characters
change the side of white and black pieces
make the translateboardDict use OS dependent characters/emojis
Create movePawn() method
There is a movePawn() method that moves pawns from a specified position to another field.
bugfix: Index Out Of Bounds
Change validatePawnMove(), and canpawnMoveAnywhere() to not throw indexOutOfBoundsException
bugfix: empty field
Validate if the user isput is an empty field.
create start() method
There is a start() method that starts game between players.
Create removePawn() method
There is a removePawn() method that removes pawns from the specified position.
Create pawn fields
There is a Pawn[][] fields 2D array that represents fields on a board. Each field can be null (empty) or a Pawn instance.
refactoring
refactor code
Create Board constructor
There is an n parameter in the constructor that specifies the side length of the square. The size must be an integer between 10 and 20. It is provided as user input.
Create toString() method
There is a toString() method that overrides the built-in method. This method marks rows as numbers and columns as letters.
add check draws to checkForWinner()
The checkForWinner() method also checks for draws.
add demo/test cases
add new board states
change board constructor to change which board to load
chage game constructor to take a variable that determines what board is loaded
pawn.getcolor()
There is a Color getColor() method that returns the color of the the pawn(white or black).
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.