From 0eef79288607bb4064a8b07c31fadb5d0b7204b4 Mon Sep 17 00:00:00 2001 From: davidrobert99 Date: Tue, 19 Apr 2022 11:03:25 +0100 Subject: [PATCH 1/2] mobs update --- subjects/mobs/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subjects/mobs/README.md b/subjects/mobs/README.md index 8adf020b..7b9e538e 100644 --- a/subjects/mobs/README.md +++ b/subjects/mobs/README.md @@ -20,7 +20,7 @@ The Mob struct should implement the following functions: - a Soldier power combat is 2 - an Associate power combat is 1 - In case of one of the mobs stays without members, the winner mob adds to its cities every city of the loser mob and the same happens to the wealth, and the loser mob loses all cities and all wealth -- `steal`, which receives the targeted mob (Mob) and a value (u32) and adds to the own mob a value and subtracts the value +- `steal`, which receives a targeted mob (Mob) and a value (u32) and subtracts the value from the target mob. The value is then added to itself. It can't be stolen more than the target mob currently has. - `conquer_city`, which receives a vector of mobs, a city name (String) and a value (u8) and adds it to the vector of cities of the own mob, only if no mob in the vector owns a city with this name Create also two submodules of mob: From d2a4e9c76b767691dad98e650e9bc4dd78b0d544 Mon Sep 17 00:00:00 2001 From: davidrobert99 Date: Tue, 19 Apr 2022 11:10:58 +0100 Subject: [PATCH 2/2] mobs update --- subjects/mobs/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subjects/mobs/README.md b/subjects/mobs/README.md index 7b9e538e..731199be 100644 --- a/subjects/mobs/README.md +++ b/subjects/mobs/README.md @@ -8,7 +8,7 @@ Create a module `mobs`, in which has to be present: - a String `name` - a Boss struct `boss` - a vector of Members `members` - - a vector of tuples containing a name String and a value u8 `cities` + - a vector of tuples `cities` containing the city name String and a value u8 - a u32 `wealth` The Mob struct should implement the following functions: