project structure

The project previously wasnt structured very
well.
Now the engine has its own module so its more
visible what file belongs to what topic.
master
TiynGER 4 years ago
parent c6ecdd4c83
commit 73f32e8598

3
.gitignore vendored

@ -1,3 +1,6 @@
*.db
bin
docs
pgn
secret.nim

@ -1,6 +1,6 @@
import algorithm
import ./chess.nim
import chess
type
MoveTree = object
@ -184,7 +184,7 @@ proc bestMove*(chess: Chess, depth: int): Move =
var tmpChess = chess
tmpChess.checkedMove(move)
var tmpEval = -tmpChess.negaMax(depth, LoVal, HiVal)
#echo("move:", moveToNotation(move, tmpChess.board), "; eval:", tmpEval)
echo("move:", moveToNotation(move, tmpChess.board), "; eval:", tmpEval)
if tmpEval > bestEval:
bestEval = tmpEval
bestMove = move

@ -1,9 +1,9 @@
import nimpy
import asyncnet, asyncdispatch
import ./secret.nim
import ./chess.nim
import ./engine.nim
import chess
import engine/secret
import engine/engine
let berserk = pyImport("berserk")
@ -11,7 +11,7 @@ var session = berserk.TokenSession(secret.api_token)
var client = berserk.Client(session = session)
let engineID = "tiyn-ychess"
let engineDifficulty = 3
let engineDifficulty = 2
let toAccept = ["tiynger"]

@ -0,0 +1 @@
--outdir:"../../bin/src"

@ -1,7 +1,7 @@
import parseutils
import ./chess.nim
import ./engine.nim
import chess
import engine/engine
proc runGameHotseat*(): void =
## Initializes and runs a game of chess as hotseat.

@ -0,0 +1,2 @@
--outdir:"../bin/src"
--path:"."

@ -1,7 +1,7 @@
import einheit
include chess
include engine
include engine/engine
testSuite ChessTest of TestSuite:

Loading…
Cancel
Save