Skip to content

Commit

Permalink
rcll: actually deduct points for wrong type-reports
Browse files Browse the repository at this point in the history
This is important, as otherwise teams could "probe" whether their zone
is correct by reporting just the machine type first, even if they play
with tags.
  • Loading branch information
TarikViehmann committed Apr 7, 2022
1 parent 3e27786 commit dbb5772
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/games/rcll/exploration.clp
Original file line number Diff line number Diff line change
Expand Up @@ -187,9 +187,15 @@
(team ?team) (host ?from-host) (port ?from-port))
?er <- (exploration-report (rtype RECORD) (name ?name) (type ?type) (zone ?zone) (type-state ~WRONG_REPORT))
(not (machine (zone ?zone) (mtype ?type)))
(gamestate (phase ?phase))
=>
(modify ?er (type-state WRONG_REPORT))
(printout t "Wrong type report: " ?type " (zone " ?zone ") from " ?team "." crlf)
(printout t "Wrong partial report: " ?type " in zone " ?zone "). "
"Awarding " ?*EXPLORATION-WRONG-REPORT-ZONE-POINTS* " points" crlf)
(assert (points (points ?*EXPLORATION-WRONG-REPORT-ZONE-POINTS*)
(phase ?phase) (team ?team) (game-time ?game-time)
(reason (str-cat "Wrong partial exploration report for type "
?type ": zone = " ?zone "."))))
)

(defrule exploration-report-zone-correct
Expand Down

0 comments on commit dbb5772

Please sign in to comment.