TicTacToe kata
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.idea
src/test/java
.gitignore
LICENSE
README.md
TicTacToe.iml
pom.xml

README.md

TicTacToe

Simple TicTacToe kata.

The rules of the tic tac toe game are the following:

* a game is over when all fields are taken
* a game is over when all fields in a column are taken by a player
* a game is over when all fields in a row are taken by a player
* a game is over when all fields in a diagonal are taken by a player
* a player can take a field if not already taken
* players take turns taking fields until the game is over
* there are two player in the game (X and O)

See Wikipedia - TicTacToe for all the info.

Object Calisthenics

Try following Object Calisthenics by Jeff Bay

Rules

In the following, I will review each of these 9 rules listed below:

* only one level of indentation per method
* don't use the else keyword
* wrap all primitives and strings
* first class collections
* one dot per line
* don't abbreviate
* keep all entities small
* no classes with more than two instance variables
* no getters/setters/properties