<commit_before>#lang racket

(require 2htdp/image (except-in 2htdp/universe left right))

; Structures
(struct dice-world (src board gt) #:transparent)
(struct territory (index player dice x y) #:transparent)
(struct game (board player moves) #:transparent)
(struct move (action gt) #:transparent)

;; Constants
; initalization constants
(define PLAYER# 2)
(define DICE# 3)
(define BOARD 2)
(define GRID (* BOARD BOARD))
(define INIT-PLAYER 0)
(define INIT-SPARE-DICE 10)
(define AI-DEPTH 4)
(define AI 1)
(define DICE-OFFSET 6)
(define SIDE 75)
(define OFFSET0 (* 2 SIDE))
(define ROTATION 30)
(define HEX 6)
(define (hexagon color)
  (rotate ROTATION (regular-polygon SIDE HEX "solid" color)))
(define X-OFFSET (image-width (hexagon "black")))<commit_msg>Redefine structure to use promises<commit_after>#lang racket

(require 2htdp/image (except-in 2htdp/universe left right))

; Structures
(struct dice-world (src board gt) #:transparent)
(struct territory (index player dice x y) #:transparent)
(struct move (action gt) #:transparent)

(define-values (game game? game-board game-player game-moves)
  (let ()
    (struct game (board player delayed-moves))
    (values game
            game?
            game-board
            game-player
            (lambda (g) (force (game-delayed-moves g))))))

;; Constants
; initalization constants
(define PLAYER# 2)
(define DICE# 3)
(define BOARD 4)
(define GRID (* BOARD BOARD))
(define INIT-PLAYER 0)
(define INIT-SPARE-DICE 10)
(define AI-DEPTH 4)
(define AI 1)
(define DICE-OFFSET 6)
(define SIDE 75)
(define OFFSET0 (* 2 SIDE))
(define ROTATION 30)
(define HEX 6)
(define (hexagon color)
  (rotate ROTATION (regular-polygon SIDE HEX "solid" color)))
(define X-OFFSET (image-width (hexagon "black")))
{'fraction_non_alphanumeric': 0.12993703491700057, 'fraction_numerical': 0.0206067544361763, 'mean_word_length': 4.49685534591195, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7568360', 'n_tokens_mistral': 651, 'n_tokens_neox': 610, 'n_words': 205}