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 1
1
[package ]
2
2
name = " _socha"
3
- version = " 3.5.1 "
3
+ version = " 3.5.2 "
4
4
edition = " 2021"
5
5
6
6
[lib ]
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ build-backend = "maturin"
4
4
5
5
[project ]
6
6
name = " socha"
7
- version = " 3.5.1 "
7
+ version = " 3.5.2 "
8
8
authors = [{
name =
" maxblan" ,
email =
" [email protected] " }]
9
9
description = " Dieses Paket ist für die Software-Challenge Germany 2025, bei der in dieser Saison das Spiel 'Hase und Igel' im Mittelpunkt steht."
10
10
readme = " README.md"
Original file line number Diff line number Diff line change @@ -80,18 +80,13 @@ impl Card {
80
80
}
81
81
Card :: EatSalad => current. eat_salad ( state) ?,
82
82
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
92
87
{
93
88
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" ,
95
90
) ) ;
96
91
}
97
92
You can’t perform that action at this time.
0 commit comments