From 84392f8ebb0498f6c408f745e3bf2ccdc9fc4e57 Mon Sep 17 00:00:00 2001 From: miguel Date: Tue, 8 Nov 2022 16:47:28 +0000 Subject: [PATCH] docs(zappy): fixing the subject and audit in zappy --- subjects/zappy/README.md | 50 ++++++++++++++++++---------------- subjects/zappy/audit/README.md | 6 ++-- 2 files changed, 28 insertions(+), 28 deletions(-) diff --git a/subjects/zappy/README.md b/subjects/zappy/README.md index 0b0b9ae86..7a81a52b7 100644 --- a/subjects/zappy/README.md +++ b/subjects/zappy/README.md @@ -20,7 +20,7 @@ Here are the different parts of the game: - The game consists in managing an entire world and its population. That world, "Minerth" is geographically made of plains, there won't be any obstacles on it. -- The game board represents the entire surface of that world, like a map. If a player exits on the right of the board, he will re-enter on the left. +- The game board is represented as a map. On the surface of this world, if a player leaves the board from the right, he will enter again from the left. ### Resources @@ -28,12 +28,12 @@ The place where we are contains many resources that can be used for your surviva - These stones are of 6 different types: - - Jade - - Peridot - - Amber - - Amethyst - - Garnet - - Ammolite + - jade + - peridot + - amber + - amethyst + - garnet + - ammolite - These resources must be randomly generated by the server, despite being random, the generation must have some logical rules, for example: @@ -54,7 +54,7 @@ These are just some examples of some rules. It's up to you to decide them, but b ### Player -- The local, is happy just looking for stones and feeding on the way, but don't be fooled by him, he can get greedy and kick you out of his way! +- The local is happy just looking for stones and feeding on the way, but don't be fooled by him, he can get greedy and kick you out of his way! - He meets, without issues, other people on the same location and sees as far as the eye can see. @@ -70,7 +70,7 @@ These are just some examples of some rules. It's up to you to decide them, but b - The ritual that allows you to increase the Minerthian physical and mental capacities must be performed as follows: - It needs to gather in the same field unit (square): + You need to gather in the same field unit (square): - A specific set of stones. - A specific number of players of the same level. @@ -78,10 +78,13 @@ These are just some examples of some rules. It's up to you to decide them, but b - The player will start the enchantment and the evolution will start. - It is not necessary that all the players are on the same team, but they need to have the same levels. - All players participating in the enchantment will reach a higher level. +- Only one player starts the enchantment and the others go to him and join. +- Only after two or more players are on the same square, they can start the enchantment. +- If one of the members dies, the others will continue the enchantment, unless the player is left alone, if that happens he has to start the process of enchantment again. Here are the combinations of resources and players you need for the enchantment and evolution: -| Level | Number of Players | Jade | Peridot | Amber | Amethyst | Garnet | Ammolite | +| Level | Number of Players | jade | peridot | amber | amethyst | garnet | ammolite | | :---: | :---------------: | :--: | :-----: | :---: | :------: | :----: | :------: | | 1-2 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | | 2-3 | 2 | 1 | 1 | 1 | 0 | 0 | 0 | @@ -140,8 +143,8 @@ Our player cannot see himself and if there is more than 1 object in a square, th ```console -------- -------- -------- - | Amber | Garnet | | - | player | Garnet | | + | amber | garnet | | + | player | garnet | | -------- -------- -------- | | | food | @@ -151,7 +154,7 @@ Our player cannot see himself and if there is more than 1 object in a square, th ``` ```console -{food, player Amber, Garnet Garnet, } +{food, player amber, garnet garnet, } ``` ### The Time and Game Speed @@ -178,25 +181,25 @@ At the beginning a team is made of `n` player and only `n`. Each player is contr At the beginning the client has 10 food units, he can therefore survive 1260 time units, 1260/t seconds. -### Reproduction +### Calling -Executing the `fork` command results in the production of an `egg`, which allows for reproduction. +Execution of the `fork` command results in the invocation of a `ship`, which allows replay. -Once the egg is laid, the player who laid the egg can go to it and hatch it, when it hatches, a new player will be born and given a random direction. +Once the `ship` arrives on the planet, the player who called it can go to it and start the process of opening doors to receive a new member, when the process is finished, a new player will appear and receive a random direction. This operation authorizes the connection of a new client. The `connect_nbr` command returns the number of authorized and unauthorized connections for this team. -- Time to lay the egg: 48/t +- Time to call the ship: 48/t -- Time for the egg to hatch 600/t +- Time for the doors to open 600/t ### Inventory The `inventory` command allows you to see what objects the player has and how much time he has left. The server will send back, for example, the following line: ``` -{food 300, Amber 4, Garnet 7, ..., Peridot 2} +{food 300, amber 4, garnet 7, ..., peridot 2} ``` ### Kick @@ -207,7 +210,7 @@ A player can kick all the players sharing the same square. It pushes them in the moving \n ``` -With K indicating the direction the player is looking to, which is where the other players will be kicked. The kick only works for players, you can't kick food or other recourses. +With K indicating the direction the player is looking to, which is where the other players will be kicked. The kick only works for players, you can't kick food or other resources and you can't kick during the evolution ritual. ### The commands @@ -219,7 +222,7 @@ Here are the actions that a player will respond to and their syntax. Remember th | turn right 90 degrees | right | 7/t | ok | | turn left 90 degrees | left | 7/t | ok | | see | see | 7/t | {square1, square2, ...} | -| inventory | inventory | 1/t | {Garnet n, Amber n, ...} | +| inventory | inventory | 1/t | {garnet n, amber n, ...} | | pick an object | pick \ | 7/t | ok/ko | | drop an object | drop \ | 7/t | ok/ko | | kick a player from the square | kick | 7/t | ok/ko | @@ -257,7 +260,7 @@ The number of squares traversed by the sound before reaching the player indicate This numbering is done by assigning '1' to the square in front of the player, then counting down the squares around the player in a trigonometric (counterclockwise) direction. Remember, sound is a wave that moves in a linear manner and the world is round, so we'll choose the shortest path for sound between the transmitter and the player we calculated for. -The following example indicates the sound trajectory that we must choose, as well as the numbers of the squares around the player. The player "A" is the source that sends te broadcast through the square 4 and "B" is the receptor witch receives the broadcast through square 2. +The following example indicates the sound trajectory that we must choose, as well as the numbers of the squares around the player. The player "A" is the source that sends the broadcast through the square 4 and "B" is the receptor witch receives the broadcast through square 2. ![Example](./sound.png) @@ -278,7 +281,7 @@ For this part, you must create a TCP server to make a connection between clients - It's forbidden to use any `exec` functions to run another server. - It must stay available at all costs. -Although you can use threads, we don't advise it. The use of multiplexing connections on your server is a better option. +> Use multiplexing connections on your server. ```console $ ./server @@ -343,7 +346,6 @@ The graphic part can be developed in a language of your choice [Javascript, Pyth ### BONUS - Create a 3D interface or any other type of representation. -- Create the server using only one process (No THREADS). - Add a flag to for a log mode when running the server. - Add a flag for the number of resources and food density (could be different levels for example). - Implement a seed in the server and client so that specific scenarios could be reproduced. diff --git a/subjects/zappy/audit/README.md b/subjects/zappy/audit/README.md index 4ffcea843..083f7c53e 100644 --- a/subjects/zappy/audit/README.md +++ b/subjects/zappy/audit/README.md @@ -127,13 +127,13 @@ Usage: ./client -n -p [-h ] ###### Can the player perform the evolution ritual and level up? -###### Can the player hatch an egg if he needs a spot in his family? +###### Can the player call a ship if he needs a spot in his family? **_resources_** ###### Can you confirm that food and stones exist as resources in the game? -###### Can you confirm that six types of stones are present in the game? (Jade, Peridot, Amber, Amethyst, Garnet, Ammolite) +###### Can you confirm that six types of stones are present in the game? (jade, peridot, amber, amethyst, garnet, ammolite) ###### Are resources randomly generated with some clear logical rules? (ask the students to explain those rules) @@ -169,8 +169,6 @@ message , ###### +Is the visualizer in 3D? -###### +Is the server using only one process (no threads)? - ###### +Is there a flag for a log mode when running the server? ###### +Is there a flag for the number of resources and food density?