-
-
Save jh0l/02b8eaa23ad684cff7f3c7fd93cae7cc to your computer and use it in GitHub Desktop.
F | |
RYYU | |
RBBB | |
BLLL | |
RRUU | |
RYBL |
. | |
.. | |
... | |
.... | |
..... | |
..... | |
..... | |
..... | |
..... | |
..... | |
....... | |
. | |
.. | |
... | |
.... | |
..... | |
..... | |
..... | |
..... | |
..... | |
..... | |
....... |
0 | |
Jessiah anthony Malik | |
23 | |
Rob William Tirtasentana | |
30 |
YUBRYLRBYRULBYRUBYRLBUYUYBLRBLBLRYRYRUYBURYBULBURYLRUBYRLBY | |
RBYURULBYRLBLRURY |
lets come up with the file format first and then work out how to convert the game code to the file format afterwards
rtf
how does this sound?
begin game #this is a comment
currentPlayer 0 #max two players, 0 is first in the save game list, 1 is second
end game
begin player
name Jessiah anthony Malik
score 10
end player
begin player
name Rob William Tirtasentana
score 100
end player
players.save
1st line determines which player's turn it currently is (int)
2nd line is the 1st players name (string)
3rd line is the 1st players score (int)
4th line is the 2nd players name (string
5th line is the 2nd players score (int)
players.save
0
Jessiah anthony Malik
23
Rob William Tirtasentana
30
players.save
1st line determines which player's turn it currently is (int)
2nd line is the 1st players name (string)
3rd line is the 1st players score (int)
4th line is the 2nd players name (string
5th line is the 2nd players score (int)players.save
0 Jessiah anthony Malik 23 Rob William Tirtasentana 30
Yep this is good I'll update the spec
I kinda feel like the mosaics should be merged with the players file, a bit unnecessary to separate the two
This is being changed to this instead of reading from folders
For each save:
{saveName}-factories.save
{saveName}-mosaic.save
{saveName}-tilebag_boxlid.save
{saveName}-players.save
The persistent save:
persistentGame-factories.save
persistentGame-mosaic.save
persistentGame-tilebag_boxlid.save
persistentGame-players.save
Jack Harry Hollis-London
20:57
We should be using any random behaviour after shuffling the tilebag
20:57
*should not be using rng behaviour
20:58
and the tilebag should only be shuffle at the start of a new game
20:58
the tilebag is only filled from the box lid again once the tilebag is empty
20:59
and it is filled in order, no shuffling happens when tilebag is refilled
21:00
To move from a tilefactory to a players floor line we can use turn 6
Everything is FIFO
Fill each factory in order from 1 to 5. Eg. Fill 1 completely then continue.
Always right to left.
Place in broken tile command is 6.
Bag and Lid are FIFO, doesnt matter how its implemented as long as it processes in that order.
Do not shuffle during testing. The seed is not neccessary for sharing tests.
The file format "persistent-*.save" where * represents all save types is reserved. No save game can be called persistent in a test case.
Saving is in the following format, "save {saveName}" then once saved all 4 files are saved with that string appended to them eg.
{saveName}-factories.save
{saveName}-mosaic.save
{saveName}-tilebag_boxlid.save
{saveName}-players.save
Commands are designated in the format the same as the assignment specification where "turn 3 L 3" is a valid turn. All tiles must be capital.
Menu items (number is command) 1. New Game; 2. Load Game; 3. Credits; 4. Quit;
Commands for "load" and "save".
Always right to left.
Would this not be left to right?
Commands for "load" and "save".
I was under the impression there is no need for a load gamecommand as loading is done from the main menu
Matt is mostly correct, however, as jh0l points out:
We always read LEFT TO RIGHT
We save with "save [saveName]"
Load game is handled explicitly from the main menu. Selection "2"
No need to load from mid-game.
Also note, each test contains 3 files:
A saved game starting state.
A file of input commands
A saved game state for the expected output - Probably just append with .output to make this clear.
Input command file example:
2
[nameOfTestFile]
turn 3 R 3
turn 0 Y 6
save [nameOfTestFile]
more clarification:
when there is no room to place a tile in the floor line, they should not linger on the floor line, they should be immediately placed in the box lid in FIFO order.
Oop sorry everyone was fairly tired when I wrote that. As stated above I should have said left to right, and there is no need for a load command. Again, sorry about the confusion.
Regarding the following.
Also note, each test contains 3 files:
A saved game starting state.
A file of input commands
A saved game state for the expected output - Probably just append with .output to make this clear
Should we change our implementation of the save state to be a single file instead of how we have it with multiple files now. I believe this was decided in the original meeting regarding saves that we would store the save over multiple files How we have it now will this cause a reduction in marks?
for scoring on the wall, when we're counting adjacent linked tiles next to a tile that is being placed on a wall, are we placing each tile on the wall before the next one is counted, or are we only counting tiles on the wall from previous rounds when counting adjacent linked tiles next to a tile that is being placed on a wall?
@CameronvanRoon @mattasymmetric @Jacob-Mango @s3731166
for scoring on the wall, when we're counting adjacent linked tiles next to a tile that is being placed on a wall, are we placing each tile on the wall before the next one is counted, or are we only counting tiles on the wall from previous rounds when counting adjacent linked tiles next to a tile that is being placed on a wall?
My understanding (could be wrong) was that tiles are placed on wall one at a time, beginning from the top row of the storage rows, going down. Thus, scores would be based on the time of placement. Therefore, you would score for a tile in the same turn only if it was above it on the storage rows.
From the rules:
Go through your pattern lines from top to bottom. Move the rightmost tile of each complete line to the space of the same color in the corresponding line of your wall. Each time you move a tile, score points immediately (see Scoring).
alright cool
game.toString(){
std::string game = "";
for each Player
game +=":"
game += player1.toString
game +=":"
game +=":"
ect...
}
Object.toString(){
std::string objStr = '' ;
for each param
objStr += ,
objStr += "param"
}