示例#1
0
 /**
  * @test
  */
 public function shouldNotAutoCreateFenWhenExists()
 {
     // given
     $fen = new Fen("rnbqkbnr\\/pppppppp\\/8\\/8\\/8\\/8\\/PPPPPPPP\\/RNBQKBNR w KQkq - 0 1");
     $fen2 = new Fen("rnbqkbnr\\/pppppppp\\/8\\/8\\/8\\/8\\/PPPPPPPP\\/RNBQKBNR w KQkq - 0 1");
     // then
     $this->assertEquals($fen->getId(), $fen2->getId());
 }
示例#2
0
 public static function getIdByFen($fen)
 {
     $fen = new Fen($fen);
     return $fen->getId();
 }
示例#3
0
 public function setFen($fen)
 {
     $fen = new Fen($fen);
     $this->setValue('fen_id', $fen->getId());
 }