09-25-2020, 12:44 PM
of course. I appreciate you taking a look.
Ultimately, I also want this addition to replace anything at (to), if the conditions are met. Then the game would be essentially done.
(game "Tumbleweed"
(players 2)
(equipment
{
(board (hex 5))
(piece "Disc" Each)
}
)
(rules
(start (place Random {"Disc1" "Disc2"}))
(play
(move Add
(to
(
forEach (sites Board)
if:(
and
(
(> (count Pieces Mover in:(sites LineOfSight at:(to))) 0)
(> (count Pieces Mover in:(sites LineOfSight at:(to))) (count at:(to)))
)
)
)
)
count:(count Pieces Mover in:(sites LineOfSight at:(to)))
stack:true
)
)
(end
(if
(no Moves Next)
(byScore
{
(score P1 (count sites in:(sites Occupied by:P1)))
(score P2 (count sites in:(sites Occupied by:P2)))
}
)
)
)
)
)
Ultimately, I also want this addition to replace anything at (to), if the conditions are met. Then the game would be essentially done.
(game "Tumbleweed"
(players 2)
(equipment
{
(board (hex 5))
(piece "Disc" Each)
}
)
(rules
(start (place Random {"Disc1" "Disc2"}))
(play
(move Add
(to
(
forEach (sites Board)
if:(
and
(
(> (count Pieces Mover in:(sites LineOfSight at:(to))) 0)
(> (count Pieces Mover in:(sites LineOfSight at:(to))) (count at:(to)))
)
)
)
)
count:(count Pieces Mover in:(sites LineOfSight at:(to)))
stack:true
)
)
(end
(if
(no Moves Next)
(byScore
{
(score P1 (count sites in:(sites Occupied by:P1)))
(score P2 (count sites in:(sites Occupied by:P2)))
}
)
)
)
)
)