Keybase proof
I hereby claim:
- I am pelensky on github.
- I am pelensky (https://keybase.io/pelensky) on keybase.
- I have a public key ASAFyvEoyVgoewByUAdPqSca5BlRi00zTZHBQTmmJ7UdEAo
To claim this, I am signing this object:
(ns tic-tac-toe.unbeatable-computer | |
(:require [tic-tac-toe.board :as ttt-board])) | |
(declare negamax) | |
(def starting-depth 0) | |
(def starting-colour 1) | |
(defn find-computer-marker [board-state] | |
(if ( #(even? (count %)) (get board-state :board)) | |
"X" "O")) |
(ns game-of-life.display) | |
(defn- current-x [coordinates] | |
(get (first coordinates) 0)) | |
(defn- current-y [coordinates] | |
(get (first coordinates) 1)) | |
(defn- remaining [coordinates] | |
into [] (rest coordinates)) |
(ns game-of-life.life) | |
(def fewest-neighbours-to-stay-living 2) | |
(def most-neighbours-to-stay-living 3) | |
(def exact-neighbours-to-regenerate 3) | |
(def neighbours | |
[ [-1 1] [0 1] [1 1] | |
[-1 0] [1 0] | |
[-1 -1] [0 -1] [1 -1]]) |
package networkplayer; | |
public class BoardObject { | |
private String boardState; | |
public void setBoardState(String boardState) { | |
this.boardState = boardState; | |
} |
(ns computer | |
(:gen-class | |
:methods [[handler [networkplayer.BoardObject] Long]]) ) | |
(declare negamax) | |
(def starting-depth 0) | |
(def starting-colour 1) | |
; Code removed |
(ns tic-tac-toe.app-runner | |
(:require clj-http.client :as client])) | |
; Code removed | |
(defn- api-call [board-state] | |
(let [result (client/post "https://xast1bug7h.execute-api.us-east-1.amazonaws.com/ttt" {:form-params {"boardState" (str board-state)} :content-type :json} )] | |
(read-string (get result :body)))) | |
(defn- player-move [board-state player] |
I hereby claim:
To claim this, I am signing this object: