#!/bin/sh
word="$2"; shift; shift
board="$2"; shift; shift
bagwas="$2"; shift; shift
rackwas="$2"; shift; shift
letter="$2"; shift; shift
number="$2"; shift; shift
orientation="$2"; shift; shift
myscore="$2"; shift; shift
oppscore="$2"; shift; shift

echo play --word "$word" \
          --board `/home/gtoal/gtoal.com/wordgames/scrabble_solver/global_analysis/boardencode $board` \
          --bagwas "\"$bagwas\"" \
          --rackwas "\"$rackwas\"" \
          --letter "$letter" \
          --number "$number" \
          --orientation "$orientation" \
          --myscore "$myscore" \
          --oppscore "$oppscore" >> ${board%.*}.sh
#/home/gtoal/gtoal.com/wordgames/scrabble_solver/global_analysis/play.exe \
#          --word "$word" \
#          --board "$board" \
#          --bagwas "$bagwas" \
#          --rackwas "$rackwas" \
#          --letter "$letter" \
#          --number "$number" \
#          --orientation "$orientation" \
#          --myscore "$myscore" \
#          --oppscore "$oppscore"
echo 0
exit 0
