Difference between revisions of "Translations:FP Homework 1/7/en"
Jump to navigation
Jump to search
(Importing a new version from external source) |
(Importing a new version from external source) |
||
Line 1: | Line 1: | ||
== 2 - Ticktacktoe == | == 2 - Ticktacktoe == | ||
− | Implement the function <code>ticktack</code> which has 2 arguments. First argument is a tuple of natural numbers and defines the number of rows | + | Implement the function <code>ticktack</code> which has 2 arguments. First argument is a tuple of natural numbers and defines the number of columns and rows of a play field. Coordinates are counted from bottom left corner. Second list contains a record of a match of ticktacktoe game given by coordinates on which played in turns player 'x' and player 'o'. Print actual state of the game in the way where play-field will be bordered by characters '-' and '|', empty squares ' ' and characters 'x' and 'o' will be on squares where the players have played. |
Revision as of 10:21, 10 November 2020
2 - Ticktacktoe
Implement the function ticktack
which has 2 arguments. First argument is a tuple of natural numbers and defines the number of columns and rows of a play field. Coordinates are counted from bottom left corner. Second list contains a record of a match of ticktacktoe game given by coordinates on which played in turns player 'x' and player 'o'. Print actual state of the game in the way where play-field will be bordered by characters '-' and '|', empty squares ' ' and characters 'x' and 'o' will be on squares where the players have played.