2022-04-07 21:20:59 +00:00
|
|
|
#lang racket
|
|
|
|
|
|
|
|
; runs all the players against each other as both first and second player.
|
|
|
|
|
|
|
|
(require "main.rkt" "players.rkt")
|
|
|
|
|
2022-04-09 18:44:51 +00:00
|
|
|
(define all-players (list player-random player-first player-last player-greedy player-nico player-generous))
|
2022-04-07 21:20:59 +00:00
|
|
|
|
2022-04-09 18:44:51 +00:00
|
|
|
(define matchups (append (combinations all-players 2) (map reverse (combinations all-players 2)) (for/list ([p all-players]) (list p p))))
|
|
|
|
|
|
|
|
(define (arena)
|
|
|
|
(define matches (for/list ([m matchups])
|
|
|
|
(start-game (first m) (second m) 6 6)))
|
|
|
|
(for ([m matches])
|
|
|
|
(save-game! m (format "/tmp/games/~a Vs ~a.dbn" (player-name (first (GameState-players m))) (player-name (second (GameState-players m)))))))
|