Content-Length: 209635 | pFad | http://github.com/Sieciechu/tic-tac-toe/commit/cf232e609d8a786b337ef7581a0443fdcddc36fd

D3 Updated method doc · Sieciechu/tic-tac-toe@cf232e6 · GitHub
Skip to content

Commit

Permalink
Updated method doc
Browse files Browse the repository at this point in the history
  • Loading branch information
Sieciechu committed Jun 7, 2019
1 parent d6b012b commit cf232e6
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/tictactoe/game.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,9 @@ func (g *ticTacToe) getGameResult() (result gameResult) {
return result
}

// This is a support method. It checks if on the board for the given line there is a winner and game is finished
// res : channel for the result
// x : the row of the board to check
// y : the column of the board to check
// dx : delta-x, the amount by which x will be increased each step
// dy : delta-y, the amount by which y will be increased each step
// This is a support method. It checks if on the board for the given line there is a winner and game is finished.
// How? It traverses n=len(board) fields starting from x,y and increasing coordinates by dx, dy each time.
// And pushes the result to the channel.
func (g *ticTacToe) allFieldsTheSame(res chan<- gameResult, x, y, dx, dy int) {
b := &g.board

Expand Down

0 comments on commit cf232e6

Please sign in to comment.








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/Sieciechu/tic-tac-toe/commit/cf232e609d8a786b337ef7581a0443fdcddc36fd

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy