File tree Expand file tree Collapse file tree 3 files changed +7
-12
lines changed Expand file tree Collapse file tree 3 files changed +7
-12
lines changed Original file line number Diff line number Diff line change 11[package ]
22name = " _socha"
3- version = " 3.5.1 "
3+ version = " 3.5.2 "
44edition = " 2021"
55
66[lib ]
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ build-backend = "maturin"
44
55[project ]
66name = " socha"
7- version = " 3.5.1 "
7+ version = " 3.5.2 "
88authors = [{ name = " maxblan" , email = " stu222782@mail.uni-kiel.de" }]
99description = " Dieses Paket ist für die Software-Challenge Germany 2025, bei der in dieser Saison das Spiel 'Hase und Igel' im Mittelpunkt steht."
1010readme = " README.md"
Original file line number Diff line number Diff line change @@ -80,18 +80,13 @@ impl Card {
8080 }
8181 Card :: EatSalad => current. eat_salad ( state) ?,
8282 Card :: SwapCarrots => {
83- let last_lettuce_position = state
84- . board
85- . get_previous_field ( Field :: Salad , state. board . track . len ( ) - 1 )
86- . ok_or_else ( || {
87- HUIError :: new_err ( "Unable to find the last lettuce field position" )
88- } ) ?;
89-
90- if current. position > last_lettuce_position
91- || other. position > last_lettuce_position
83+ let last_lettuce_position = 57 ;
84+
85+ if current. position >= last_lettuce_position
86+ || other. position >= last_lettuce_position
9287 {
9388 return Err ( HUIError :: new_err (
94- "You can only play this card if both players haven't passed the last lettuce field" ,
89+ "You can only play this card if both players are before the last lettuce field" ,
9590 ) ) ;
9691 }
9792
You can’t perform that action at this time.
0 commit comments