How to use getFieldValue method in storybook-root

Best JavaScript code snippet using storybook-root

tic-tac-toe.spec.js

Source:tic-tac-toe.spec.js Github

copy

Full Screen

...383 it('should return correct field value', () => {384 let game;385 game = new TicTacToe();386 game.nextTurn(0, 1)387 expect(game.getFieldValue(0, 1)).to.equal('x')388 expect(game.getFieldValue(2, 2)).to.equal(null)389 game.nextTurn(0, 2)390 expect(game.getFieldValue(0, 2)).to.equal('o')391 expect(game.getFieldValue(0, 0)).to.equal(null)392 game.nextTurn(0, 2)393 expect(game.getFieldValue(0, 2)).to.equal('o')394 expect(game.getFieldValue(2, 2)).to.equal(null)395 game.nextTurn(1, 0)396 expect(game.getFieldValue(1, 0)).to.equal('x')397 expect(game.getFieldValue(0, 1)).to.equal('x')398 game.nextTurn(2, 2)399 expect(game.getFieldValue(2, 2)).to.equal('o')400 expect(game.getFieldValue(0, 1)).to.equal('x')401 game.nextTurn(0, 0)402 expect(game.getFieldValue(0, 0)).to.equal('x')403 expect(game.getFieldValue(0, 1)).to.equal('x')404 game.nextTurn(0, 1)405 expect(game.getFieldValue(0, 1)).to.equal('x')406 expect(game.getFieldValue(1, 2)).to.equal(null)407 game.nextTurn(2, 0)408 expect(game.getFieldValue(2, 0)).to.equal('o')409 expect(game.getFieldValue(2, 0)).to.equal('o')410 game.nextTurn(2, 2)411 expect(game.getFieldValue(2, 2)).to.equal('o')412 expect(game.getFieldValue(2, 1)).to.equal(null)413 game.nextTurn(0, 1)414 expect(game.getFieldValue(0, 1)).to.equal('x')415 expect(game.getFieldValue(1, 0)).to.equal('x')416 game.nextTurn(0, 2)417 expect(game.getFieldValue(0, 2)).to.equal('o')418 expect(game.getFieldValue(2, 1)).to.equal(null)419 game.nextTurn(0, 1)420 expect(game.getFieldValue(0, 1)).to.equal('x')421 expect(game.getFieldValue(1, 2)).to.equal(null)422 game.nextTurn(2, 0)423 expect(game.getFieldValue(2, 0)).to.equal('o')424 expect(game.getFieldValue(1, 1)).to.equal(null)425 game.nextTurn(2, 2)426 expect(game.getFieldValue(2, 2)).to.equal('o')427 expect(game.getFieldValue(2, 0)).to.equal('o')428 game.nextTurn(2, 1)429 expect(game.getFieldValue(2, 1)).to.equal('x')430 expect(game.getFieldValue(2, 2)).to.equal('o')431 game.nextTurn(1, 1)432 expect(game.getFieldValue(1, 1)).to.equal('o')433 expect(game.getFieldValue(0, 2)).to.equal('o')434 game = new TicTacToe();435 game.nextTurn(0, 2)436 expect(game.getFieldValue(0, 2)).to.equal('x')437 expect(game.getFieldValue(2, 1)).to.equal(null)438 game.nextTurn(1, 1)439 expect(game.getFieldValue(1, 1)).to.equal('o')440 expect(game.getFieldValue(2, 1)).to.equal(null)441 game.nextTurn(0, 2)442 expect(game.getFieldValue(0, 2)).to.equal('x')443 expect(game.getFieldValue(2, 2)).to.equal(null)444 game.nextTurn(1, 1)445 expect(game.getFieldValue(1, 1)).to.equal('o')446 expect(game.getFieldValue(1, 2)).to.equal(null)447 game.nextTurn(1, 2)448 expect(game.getFieldValue(1, 2)).to.equal('x')449 expect(game.getFieldValue(1, 0)).to.equal(null)450 game.nextTurn(0, 1)451 expect(game.getFieldValue(0, 1)).to.equal('o')452 expect(game.getFieldValue(0, 2)).to.equal('x')453 game.nextTurn(2, 0)454 expect(game.getFieldValue(2, 0)).to.equal('x')455 expect(game.getFieldValue(2, 1)).to.equal(null)456 game.nextTurn(0, 1)457 expect(game.getFieldValue(0, 1)).to.equal('o')458 expect(game.getFieldValue(0, 2)).to.equal('x')459 game.nextTurn(0, 1)460 expect(game.getFieldValue(0, 1)).to.equal('o')461 expect(game.getFieldValue(1, 0)).to.equal(null)462 game.nextTurn(1, 1)463 expect(game.getFieldValue(1, 1)).to.equal('o')464 expect(game.getFieldValue(2, 1)).to.equal(null)465 game.nextTurn(1, 2)466 expect(game.getFieldValue(1, 2)).to.equal('x')467 expect(game.getFieldValue(1, 0)).to.equal(null)468 game.nextTurn(2, 0)469 expect(game.getFieldValue(2, 0)).to.equal('x')470 expect(game.getFieldValue(1, 0)).to.equal(null)471 game.nextTurn(1, 1)472 expect(game.getFieldValue(1, 1)).to.equal('o')473 expect(game.getFieldValue(1, 0)).to.equal(null)474 game.nextTurn(1, 2)475 expect(game.getFieldValue(1, 2)).to.equal('x')476 expect(game.getFieldValue(1, 2)).to.equal('x')477 game.nextTurn(2, 0)478 expect(game.getFieldValue(2, 0)).to.equal('x')479 expect(game.getFieldValue(2, 0)).to.equal('x')480 game.nextTurn(0, 1)481 expect(game.getFieldValue(0, 1)).to.equal('o')482 expect(game.getFieldValue(2, 1)).to.equal(null)483 game.nextTurn(2, 1)484 expect(game.getFieldValue(2, 1)).to.equal('o')485 expect(game.getFieldValue(2, 0)).to.equal('x')486 game = new TicTacToe();487 game.nextTurn(0, 1)488 expect(game.getFieldValue(0, 1)).to.equal('x')489 expect(game.getFieldValue(0, 2)).to.equal(null)490 game.nextTurn(0, 0)491 expect(game.getFieldValue(0, 0)).to.equal('o')492 expect(game.getFieldValue(0, 1)).to.equal('x')493 game.nextTurn(0, 1)494 expect(game.getFieldValue(0, 1)).to.equal('x')495 expect(game.getFieldValue(1, 1)).to.equal(null)496 game.nextTurn(1, 1)497 expect(game.getFieldValue(1, 1)).to.equal('x')498 expect(game.getFieldValue(2, 0)).to.equal(null)499 game.nextTurn(2, 1)500 expect(game.getFieldValue(2, 1)).to.equal('o')501 expect(game.getFieldValue(0, 0)).to.equal('o')502 game.nextTurn(0, 2)503 expect(game.getFieldValue(0, 2)).to.equal('x')504 expect(game.getFieldValue(1, 0)).to.equal(null)505 game.nextTurn(0, 2)506 expect(game.getFieldValue(0, 2)).to.equal('x')507 expect(game.getFieldValue(0, 1)).to.equal('x')508 game.nextTurn(0, 0)509 expect(game.getFieldValue(0, 0)).to.equal('o')510 expect(game.getFieldValue(1, 0)).to.equal(null)511 game.nextTurn(2, 2)512 expect(game.getFieldValue(2, 2)).to.equal('o')513 expect(game.getFieldValue(2, 0)).to.equal(null)514 game.nextTurn(0, 2)515 expect(game.getFieldValue(0, 2)).to.equal('x')516 expect(game.getFieldValue(1, 2)).to.equal(null)517 game.nextTurn(2, 0)518 expect(game.getFieldValue(2, 0)).to.equal('x')519 expect(game.getFieldValue(0, 2)).to.equal('x')520 game = new TicTacToe();521 game.nextTurn(1, 2)522 expect(game.getFieldValue(1, 2)).to.equal('x')523 expect(game.getFieldValue(0, 2)).to.equal(null)524 game.nextTurn(0, 0)525 expect(game.getFieldValue(0, 0)).to.equal('o')526 expect(game.getFieldValue(0, 1)).to.equal(null)527 game.nextTurn(1, 0)528 expect(game.getFieldValue(1, 0)).to.equal('x')529 expect(game.getFieldValue(2, 2)).to.equal(null)530 game.nextTurn(0, 1)531 expect(game.getFieldValue(0, 1)).to.equal('o')532 expect(game.getFieldValue(1, 2)).to.equal('x')533 game.nextTurn(1, 1)534 expect(game.getFieldValue(1, 1)).to.equal('x')535 expect(game.getFieldValue(2, 2)).to.equal(null)536 game = new TicTacToe();537 game.nextTurn(1, 0)538 expect(game.getFieldValue(1, 0)).to.equal('x')539 expect(game.getFieldValue(0, 0)).to.equal(null)540 game.nextTurn(1, 2)541 expect(game.getFieldValue(1, 2)).to.equal('o')542 expect(game.getFieldValue(1, 2)).to.equal('o')543 game.nextTurn(1, 0)544 expect(game.getFieldValue(1, 0)).to.equal('x')545 expect(game.getFieldValue(0, 1)).to.equal(null)546 game.nextTurn(1, 0)547 expect(game.getFieldValue(1, 0)).to.equal('x')548 expect(game.getFieldValue(2, 1)).to.equal(null)549 game.nextTurn(2, 1)550 expect(game.getFieldValue(2, 1)).to.equal('x')551 expect(game.getFieldValue(1, 1)).to.equal(null)552 game.nextTurn(2, 2)553 expect(game.getFieldValue(2, 2)).to.equal('o')554 expect(game.getFieldValue(0, 0)).to.equal(null)555 game.nextTurn(1, 0)556 expect(game.getFieldValue(1, 0)).to.equal('x')557 expect(game.getFieldValue(2, 0)).to.equal(null)558 game.nextTurn(0, 0)559 expect(game.getFieldValue(0, 0)).to.equal('x')560 expect(game.getFieldValue(2, 0)).to.equal(null)561 game.nextTurn(0, 1)562 expect(game.getFieldValue(0, 1)).to.equal('o')563 expect(game.getFieldValue(2, 0)).to.equal(null)564 game.nextTurn(2, 1)565 expect(game.getFieldValue(2, 1)).to.equal('x')566 expect(game.getFieldValue(1, 0)).to.equal('x')567 game.nextTurn(0, 2)568 expect(game.getFieldValue(0, 2)).to.equal('x')569 expect(game.getFieldValue(1, 1)).to.equal(null)570 game.nextTurn(0, 0)571 expect(game.getFieldValue(0, 0)).to.equal('x')572 expect(game.getFieldValue(1, 2)).to.equal('o')573 game.nextTurn(1, 0)574 expect(game.getFieldValue(1, 0)).to.equal('x')575 expect(game.getFieldValue(0, 1)).to.equal('o')576 game.nextTurn(2, 0)577 expect(game.getFieldValue(2, 0)).to.equal('o')578 expect(game.getFieldValue(2, 2)).to.equal('o')579 game.nextTurn(2, 2)580 expect(game.getFieldValue(2, 2)).to.equal('o')581 expect(game.getFieldValue(0, 2)).to.equal('x')582 game.nextTurn(0, 2)583 expect(game.getFieldValue(0, 2)).to.equal('x')584 expect(game.getFieldValue(0, 0)).to.equal('x')585 game.nextTurn(2, 0)586 expect(game.getFieldValue(2, 0)).to.equal('o')587 expect(game.getFieldValue(2, 0)).to.equal('o')588 game.nextTurn(0, 1)589 expect(game.getFieldValue(0, 1)).to.equal('o')590 expect(game.getFieldValue(1, 1)).to.equal(null)591 game.nextTurn(2, 1)592 expect(game.getFieldValue(2, 1)).to.equal('x')593 expect(game.getFieldValue(0, 1)).to.equal('o')594 game.nextTurn(1, 1)595 expect(game.getFieldValue(1, 1)).to.equal('x')596 expect(game.getFieldValue(0, 0)).to.equal('x')597 game = new TicTacToe();598 game.nextTurn(2, 1)599 expect(game.getFieldValue(2, 1)).to.equal('x')600 expect(game.getFieldValue(2, 2)).to.equal(null)601 game.nextTurn(1, 1)602 expect(game.getFieldValue(1, 1)).to.equal('o')603 expect(game.getFieldValue(0, 2)).to.equal(null)604 game.nextTurn(1, 0)605 expect(game.getFieldValue(1, 0)).to.equal('x')606 expect(game.getFieldValue(0, 0)).to.equal(null)607 game.nextTurn(2, 0)608 expect(game.getFieldValue(2, 0)).to.equal('o')609 expect(game.getFieldValue(0, 1)).to.equal(null)610 game.nextTurn(0, 0)611 expect(game.getFieldValue(0, 0)).to.equal('x')612 expect(game.getFieldValue(2, 1)).to.equal('x')613 game.nextTurn(1, 1)614 expect(game.getFieldValue(1, 1)).to.equal('o')615 expect(game.getFieldValue(1, 2)).to.equal(null)616 game.nextTurn(1, 2)617 expect(game.getFieldValue(1, 2)).to.equal('o')618 expect(game.getFieldValue(0, 1)).to.equal(null)619 game.nextTurn(0, 2)620 expect(game.getFieldValue(0, 2)).to.equal('x')621 expect(game.getFieldValue(2, 0)).to.equal('o')622 game.nextTurn(2, 0)623 expect(game.getFieldValue(2, 0)).to.equal('o')624 expect(game.getFieldValue(2, 2)).to.equal(null)625 game.nextTurn(2, 2)626 expect(game.getFieldValue(2, 2)).to.equal('o')627 expect(game.getFieldValue(0, 2)).to.equal('x')628 game.nextTurn(1, 2)629 expect(game.getFieldValue(1, 2)).to.equal('o')630 expect(game.getFieldValue(2, 1)).to.equal('x')631 game.nextTurn(2, 2)632 expect(game.getFieldValue(2, 2)).to.equal('o')633 expect(game.getFieldValue(1, 0)).to.equal('x')634 game.nextTurn(0, 2)635 expect(game.getFieldValue(0, 2)).to.equal('x')636 expect(game.getFieldValue(2, 1)).to.equal('x')637 game.nextTurn(2, 2)638 expect(game.getFieldValue(2, 2)).to.equal('o')639 expect(game.getFieldValue(0, 2)).to.equal('x')640 game.nextTurn(1, 0)641 expect(game.getFieldValue(1, 0)).to.equal('x')642 expect(game.getFieldValue(2, 0)).to.equal('o')643 game.nextTurn(0, 0)644 expect(game.getFieldValue(0, 0)).to.equal('x')645 expect(game.getFieldValue(1, 2)).to.equal('o')646 game.nextTurn(1, 1)647 expect(game.getFieldValue(1, 1)).to.equal('o')648 expect(game.getFieldValue(1, 2)).to.equal('o')649 game.nextTurn(1, 2)650 expect(game.getFieldValue(1, 2)).to.equal('o')651 expect(game.getFieldValue(1, 2)).to.equal('o')652 game.nextTurn(1, 1)653 expect(game.getFieldValue(1, 1)).to.equal('o')654 expect(game.getFieldValue(0, 1)).to.equal(null)655 game.nextTurn(2, 2)656 expect(game.getFieldValue(2, 2)).to.equal('o')657 expect(game.getFieldValue(1, 0)).to.equal('x')658 game.nextTurn(1, 1)659 expect(game.getFieldValue(1, 1)).to.equal('o')660 expect(game.getFieldValue(2, 1)).to.equal('x')661 game.nextTurn(1, 2)662 expect(game.getFieldValue(1, 2)).to.equal('o')663 expect(game.getFieldValue(0, 0)).to.equal('x')664 game.nextTurn(0, 0)665 expect(game.getFieldValue(0, 0)).to.equal('x')666 expect(game.getFieldValue(1, 1)).to.equal('o')667 game.nextTurn(0, 1)668 expect(game.getFieldValue(0, 1)).to.equal('x')669 expect(game.getFieldValue(1, 2)).to.equal('o')670 game = new TicTacToe();671 game.nextTurn(2, 1)672 expect(game.getFieldValue(2, 1)).to.equal('x')673 expect(game.getFieldValue(0, 1)).to.equal(null)674 game.nextTurn(2, 0)675 expect(game.getFieldValue(2, 0)).to.equal('o')676 expect(game.getFieldValue(2, 2)).to.equal(null)677 game.nextTurn(0, 1)678 expect(game.getFieldValue(0, 1)).to.equal('x')679 expect(game.getFieldValue(1, 0)).to.equal(null)680 game.nextTurn(1, 1)681 expect(game.getFieldValue(1, 1)).to.equal('o')682 expect(game.getFieldValue(1, 1)).to.equal('o')683 game.nextTurn(2, 1)684 expect(game.getFieldValue(2, 1)).to.equal('x')685 expect(game.getFieldValue(0, 0)).to.equal(null)686 game.nextTurn(1, 2)687 expect(game.getFieldValue(1, 2)).to.equal('x')688 expect(game.getFieldValue(0, 2)).to.equal(null)689 game.nextTurn(1, 0)690 expect(game.getFieldValue(1, 0)).to.equal('o')691 expect(game.getFieldValue(0, 1)).to.equal('x')692 game.nextTurn(0, 1)693 expect(game.getFieldValue(0, 1)).to.equal('x')694 expect(game.getFieldValue(2, 2)).to.equal(null)695 game.nextTurn(0, 0)696 expect(game.getFieldValue(0, 0)).to.equal('x')697 expect(game.getFieldValue(2, 0)).to.equal('o')698 game.nextTurn(0, 2)699 expect(game.getFieldValue(0, 2)).to.equal('o')700 expect(game.getFieldValue(1, 0)).to.equal('o')701 game = new TicTacToe();702 game.nextTurn(0, 1)703 expect(game.getFieldValue(0, 1)).to.equal('x')704 expect(game.getFieldValue(2, 0)).to.equal(null)705 game.nextTurn(2, 1)706 expect(game.getFieldValue(2, 1)).to.equal('o')707 expect(game.getFieldValue(0, 1)).to.equal('x')708 game.nextTurn(1, 2)709 expect(game.getFieldValue(1, 2)).to.equal('x')710 expect(game.getFieldValue(1, 2)).to.equal('x')711 game.nextTurn(0, 1)712 expect(game.getFieldValue(0, 1)).to.equal('x')713 expect(game.getFieldValue(0, 0)).to.equal(null)714 game.nextTurn(2, 0)715 expect(game.getFieldValue(2, 0)).to.equal('o')716 expect(game.getFieldValue(0, 1)).to.equal('x')717 game.nextTurn(2, 1)718 expect(game.getFieldValue(2, 1)).to.equal('o')719 expect(game.getFieldValue(1, 0)).to.equal(null)720 game.nextTurn(2, 2)721 expect(game.getFieldValue(2, 2)).to.equal('x')722 expect(game.getFieldValue(0, 1)).to.equal('x')723 game.nextTurn(0, 2)724 expect(game.getFieldValue(0, 2)).to.equal('o')725 expect(game.getFieldValue(1, 2)).to.equal('x')726 game.nextTurn(0, 0)727 expect(game.getFieldValue(0, 0)).to.equal('x')728 expect(game.getFieldValue(2, 0)).to.equal('o')729 game.nextTurn(0, 0)730 expect(game.getFieldValue(0, 0)).to.equal('x')731 expect(game.getFieldValue(0, 2)).to.equal('o')732 game.nextTurn(0, 0)733 expect(game.getFieldValue(0, 0)).to.equal('x')734 expect(game.getFieldValue(2, 0)).to.equal('o')735 game.nextTurn(1, 1)736 expect(game.getFieldValue(1, 1)).to.equal('o')737 expect(game.getFieldValue(2, 0)).to.equal('o')738 game = new TicTacToe();739 game.nextTurn(0, 0)740 expect(game.getFieldValue(0, 0)).to.equal('x')741 expect(game.getFieldValue(2, 1)).to.equal(null)742 game.nextTurn(0, 1)743 expect(game.getFieldValue(0, 1)).to.equal('o')744 expect(game.getFieldValue(2, 2)).to.equal(null)745 game.nextTurn(1, 0)746 expect(game.getFieldValue(1, 0)).to.equal('x')747 expect(game.getFieldValue(1, 0)).to.equal('x')748 game.nextTurn(0, 0)749 expect(game.getFieldValue(0, 0)).to.equal('x')750 expect(game.getFieldValue(1, 0)).to.equal('x')751 game.nextTurn(2, 2)752 expect(game.getFieldValue(2, 2)).to.equal('o')753 expect(game.getFieldValue(2, 1)).to.equal(null)754 game.nextTurn(2, 1)755 expect(game.getFieldValue(2, 1)).to.equal('x')756 expect(game.getFieldValue(1, 0)).to.equal('x')757 game.nextTurn(2, 1)758 expect(game.getFieldValue(2, 1)).to.equal('x')759 expect(game.getFieldValue(1, 0)).to.equal('x')760 game.nextTurn(2, 0)761 expect(game.getFieldValue(2, 0)).to.equal('o')762 expect(game.getFieldValue(2, 0)).to.equal('o')763 game.nextTurn(1, 1)764 expect(game.getFieldValue(1, 1)).to.equal('x')765 expect(game.getFieldValue(2, 1)).to.equal('x')766 game.nextTurn(1, 0)767 expect(game.getFieldValue(1, 0)).to.equal('x')768 expect(game.getFieldValue(1, 2)).to.equal(null)769 game.nextTurn(0, 0)770 expect(game.getFieldValue(0, 0)).to.equal('x')771 expect(game.getFieldValue(2, 2)).to.equal('o')772 game.nextTurn(0, 2)773 expect(game.getFieldValue(0, 2)).to.equal('o')774 expect(game.getFieldValue(1, 1)).to.equal('x')775 game.nextTurn(2, 2)776 expect(game.getFieldValue(2, 2)).to.equal('o')777 expect(game.getFieldValue(2, 0)).to.equal('o')778 game.nextTurn(2, 1)779 expect(game.getFieldValue(2, 1)).to.equal('x')780 expect(game.getFieldValue(0, 1)).to.equal('o')781 game.nextTurn(1, 2)782 expect(game.getFieldValue(1, 2)).to.equal('x')783 expect(game.getFieldValue(2, 1)).to.equal('x')784 game = new TicTacToe();785 game.nextTurn(2, 2)786 expect(game.getFieldValue(2, 2)).to.equal('x')787 expect(game.getFieldValue(2, 2)).to.equal('x')788 game.nextTurn(1, 2)789 expect(game.getFieldValue(1, 2)).to.equal('o')790 expect(game.getFieldValue(2, 0)).to.equal(null)791 game.nextTurn(1, 0)792 expect(game.getFieldValue(1, 0)).to.equal('x')793 expect(game.getFieldValue(0, 0)).to.equal(null)794 game.nextTurn(0, 0)795 expect(game.getFieldValue(0, 0)).to.equal('o')796 expect(game.getFieldValue(0, 2)).to.equal(null)797 game.nextTurn(0, 2)798 expect(game.getFieldValue(0, 2)).to.equal('x')799 expect(game.getFieldValue(1, 1)).to.equal(null)800 game.nextTurn(2, 2)801 expect(game.getFieldValue(2, 2)).to.equal('x')802 expect(game.getFieldValue(0, 0)).to.equal('o')803 game.nextTurn(1, 0)804 expect(game.getFieldValue(1, 0)).to.equal('x')805 expect(game.getFieldValue(2, 2)).to.equal('x')806 game.nextTurn(1, 0)807 expect(game.getFieldValue(1, 0)).to.equal('x')808 expect(game.getFieldValue(1, 1)).to.equal(null)809 game.nextTurn(0, 2)810 expect(game.getFieldValue(0, 2)).to.equal('x')811 expect(game.getFieldValue(2, 1)).to.equal(null)812 game.nextTurn(1, 0)813 expect(game.getFieldValue(1, 0)).to.equal('x')814 expect(game.getFieldValue(2, 1)).to.equal(null)815 game.nextTurn(2, 2)816 expect(game.getFieldValue(2, 2)).to.equal('x')817 expect(game.getFieldValue(0, 0)).to.equal('o')818 game.nextTurn(0, 2)819 expect(game.getFieldValue(0, 2)).to.equal('x')820 expect(game.getFieldValue(0, 2)).to.equal('x')821 game.nextTurn(1, 1)822 expect(game.getFieldValue(1, 1)).to.equal('o')823 expect(game.getFieldValue(0, 2)).to.equal('x')824 game.nextTurn(2, 1)825 expect(game.getFieldValue(2, 1)).to.equal('x')826 expect(game.getFieldValue(0, 1)).to.equal(null)827 game.nextTurn(0, 1)828 expect(game.getFieldValue(0, 1)).to.equal('o')829 expect(game.getFieldValue(2, 2)).to.equal('x')830 game.nextTurn(2, 2)831 expect(game.getFieldValue(2, 2)).to.equal('x')832 expect(game.getFieldValue(0, 0)).to.equal('o')833 game.nextTurn(2, 0)834 expect(game.getFieldValue(2, 0)).to.equal('x')835 expect(game.getFieldValue(1, 2)).to.equal('o')836 });837 });838 describe('#isDraw', () => {839 it('should return false if game is not finished or there is a winner, and true if it is a draw', () => {840 let game;841 game = new TicTacToe();842 game.nextTurn(1, 0);843 expect(game.isDraw()).to.equal(false);844 game.nextTurn(2, 2);845 expect(game.isDraw()).to.equal(false);846 game.nextTurn(0, 2);847 expect(game.isDraw()).to.equal(false);848 game.nextTurn(1, 0);849 expect(game.isDraw()).to.equal(false);850 game.nextTurn(2, 2);851 expect(game.isDraw()).to.equal(false);852 game.nextTurn(1, 1);853 expect(game.isDraw()).to.equal(false);854 game.nextTurn(0, 2);855 expect(game.isDraw()).to.equal(false);856 game.nextTurn(2, 2);857 expect(game.isDraw()).to.equal(false);858 game.nextTurn(0, 2);859 expect(game.isDraw()).to.equal(false);860 game.nextTurn(0, 2);861 expect(game.isDraw()).to.equal(false);862 game.nextTurn(1, 1);863 expect(game.isDraw()).to.equal(false);864 game.nextTurn(1, 2);865 expect(game.isDraw()).to.equal(false);866 game.nextTurn(1, 1);867 expect(game.isDraw()).to.equal(false);868 game.nextTurn(1, 2);869 expect(game.isDraw()).to.equal(false);870 game.nextTurn(2, 0);871 expect(game.isDraw()).to.equal(false);872 game.nextTurn(0, 0);873 expect(game.isDraw()).to.equal(false);874 game.nextTurn(2, 0);875 expect(game.isDraw()).to.equal(false);876 game.nextTurn(1, 1);877 expect(game.isDraw()).to.equal(false);878 game.nextTurn(0, 1);879 expect(game.isDraw()).to.equal(false);880 game.nextTurn(1, 2);881 expect(game.isDraw()).to.equal(false);882 game.nextTurn(1, 1);883 expect(game.isDraw()).to.equal(false);884 game.nextTurn(0, 1);885 expect(game.isDraw()).to.equal(false);886 game.nextTurn(2, 0);887 expect(game.isDraw()).to.equal(false);888 game.nextTurn(2, 1);889 expect(game.isDraw()).to.equal(true);890 game = new TicTacToe();891 game.nextTurn(1, 2);892 expect(game.isDraw()).to.equal(false);893 game.nextTurn(2, 1);894 expect(game.isDraw()).to.equal(false);895 game.nextTurn(1, 0);896 expect(game.isDraw()).to.equal(false);897 game.nextTurn(0, 1);898 expect(game.isDraw()).to.equal(false);899 game.nextTurn(0, 1);900 expect(game.isDraw()).to.equal(false);901 game.nextTurn(1, 1);902 expect(game.isDraw()).to.equal(false);903 game = new TicTacToe();904 game.nextTurn(0, 0);905 expect(game.isDraw()).to.equal(false);906 game.nextTurn(2, 2);907 expect(game.isDraw()).to.equal(false);908 game.nextTurn(0, 0);909 expect(game.isDraw()).to.equal(false);910 game.nextTurn(1, 0);911 expect(game.isDraw()).to.equal(false);912 game.nextTurn(2, 2);913 expect(game.isDraw()).to.equal(false);914 game.nextTurn(0, 2);915 expect(game.isDraw()).to.equal(false);916 game.nextTurn(2, 2);917 expect(game.isDraw()).to.equal(false);918 game.nextTurn(0, 0);919 expect(game.isDraw()).to.equal(false);920 game.nextTurn(2, 0);921 expect(game.isDraw()).to.equal(false);922 game = new TicTacToe();923 game.nextTurn(2, 2);924 expect(game.isDraw()).to.equal(false);925 game.nextTurn(1, 2);926 expect(game.isDraw()).to.equal(false);927 game.nextTurn(0, 0);928 expect(game.isDraw()).to.equal(false);929 game.nextTurn(1, 0);930 expect(game.isDraw()).to.equal(false);931 game.nextTurn(0, 1);932 expect(game.isDraw()).to.equal(false);933 game.nextTurn(2, 2);934 expect(game.isDraw()).to.equal(false);935 game.nextTurn(2, 0);936 expect(game.isDraw()).to.equal(false);937 game.nextTurn(2, 0);938 expect(game.isDraw()).to.equal(false);939 game.nextTurn(0, 0);940 expect(game.isDraw()).to.equal(false);941 game.nextTurn(0, 1);942 expect(game.isDraw()).to.equal(false);943 game.nextTurn(1, 2);944 expect(game.isDraw()).to.equal(false);945 game.nextTurn(2, 0);946 expect(game.isDraw()).to.equal(false);947 game.nextTurn(0, 1);948 expect(game.isDraw()).to.equal(false);949 game.nextTurn(0, 0);950 expect(game.isDraw()).to.equal(false);951 game.nextTurn(2, 1);952 expect(game.isDraw()).to.equal(false);953 game.nextTurn(2, 2);954 expect(game.isDraw()).to.equal(false);955 game.nextTurn(2, 2);956 expect(game.isDraw()).to.equal(false);957 game.nextTurn(0, 2);958 expect(game.isDraw()).to.equal(false);959 game.nextTurn(1, 2);960 expect(game.isDraw()).to.equal(false);961 game.nextTurn(1, 2);962 expect(game.isDraw()).to.equal(false);963 game.nextTurn(0, 2);964 expect(game.isDraw()).to.equal(false);965 game.nextTurn(1, 2);966 expect(game.isDraw()).to.equal(false);967 game.nextTurn(2, 1);968 expect(game.isDraw()).to.equal(false);969 game.nextTurn(2, 0);970 expect(game.isDraw()).to.equal(false);971 game.nextTurn(0, 0);972 expect(game.isDraw()).to.equal(false);973 game.nextTurn(1, 2);974 expect(game.isDraw()).to.equal(false);975 game.nextTurn(0, 0);976 expect(game.isDraw()).to.equal(false);977 game.nextTurn(1, 0);978 expect(game.isDraw()).to.equal(false);979 game.nextTurn(0, 2);980 expect(game.isDraw()).to.equal(false);981 game.nextTurn(2, 1);982 expect(game.isDraw()).to.equal(false);983 game.nextTurn(0, 1);984 expect(game.isDraw()).to.equal(false);985 game.nextTurn(0, 0);986 expect(game.isDraw()).to.equal(false);987 game.nextTurn(2, 2);988 expect(game.isDraw()).to.equal(false);989 game.nextTurn(0, 1);990 expect(game.isDraw()).to.equal(false);991 game.nextTurn(0, 0);992 expect(game.isDraw()).to.equal(false);993 game.nextTurn(2, 0);994 expect(game.isDraw()).to.equal(false);995 game.nextTurn(1, 1);996 expect(game.isDraw()).to.equal(false);997 game = new TicTacToe();998 game.nextTurn(2, 0);999 expect(game.isDraw()).to.equal(false);1000 game.nextTurn(1, 1);1001 expect(game.isDraw()).to.equal(false);1002 game.nextTurn(1, 0);1003 expect(game.isDraw()).to.equal(false);1004 game.nextTurn(0, 2);1005 expect(game.isDraw()).to.equal(false);1006 game.nextTurn(2, 2);1007 expect(game.isDraw()).to.equal(false);1008 game.nextTurn(0, 1);1009 expect(game.isDraw()).to.equal(false);1010 game.nextTurn(2, 1);1011 expect(game.isDraw()).to.equal(false);1012 game = new TicTacToe();1013 game.nextTurn(0, 2);1014 expect(game.isDraw()).to.equal(false);1015 game.nextTurn(0, 2);1016 expect(game.isDraw()).to.equal(false);1017 game.nextTurn(2, 1);1018 expect(game.isDraw()).to.equal(false);1019 game.nextTurn(0, 2);1020 expect(game.isDraw()).to.equal(false);1021 game.nextTurn(0, 1);1022 expect(game.isDraw()).to.equal(false);1023 game.nextTurn(2, 2);1024 expect(game.isDraw()).to.equal(false);1025 game.nextTurn(0, 0);1026 expect(game.isDraw()).to.equal(false);1027 game = new TicTacToe();1028 game.nextTurn(0, 0);1029 expect(game.isDraw()).to.equal(false);1030 game.nextTurn(1, 1);1031 expect(game.isDraw()).to.equal(false);1032 game.nextTurn(1, 1);1033 expect(game.isDraw()).to.equal(false);1034 game.nextTurn(0, 0);1035 expect(game.isDraw()).to.equal(false);1036 game.nextTurn(2, 2);1037 expect(game.isDraw()).to.equal(false);1038 game.nextTurn(0, 0);1039 expect(game.isDraw()).to.equal(false);1040 game.nextTurn(2, 1);1041 expect(game.isDraw()).to.equal(false);1042 game.nextTurn(2, 2);1043 expect(game.isDraw()).to.equal(false);1044 game.nextTurn(0, 0);1045 expect(game.isDraw()).to.equal(false);1046 game.nextTurn(1, 2);1047 expect(game.isDraw()).to.equal(false);1048 game.nextTurn(2, 2);1049 expect(game.isDraw()).to.equal(false);1050 game.nextTurn(1, 0);1051 expect(game.isDraw()).to.equal(false);1052 game.nextTurn(2, 0);1053 expect(game.isDraw()).to.equal(false);1054 game.nextTurn(1, 1);1055 expect(game.isDraw()).to.equal(false);1056 game.nextTurn(0, 2);1057 expect(game.isDraw()).to.equal(false);1058 game.nextTurn(2, 0);1059 expect(game.isDraw()).to.equal(false);1060 game.nextTurn(1, 0);1061 expect(game.isDraw()).to.equal(false);1062 game.nextTurn(0, 1);1063 expect(game.isDraw()).to.equal(true);1064 game = new TicTacToe();1065 game.nextTurn(1, 1);1066 expect(game.isDraw()).to.equal(false);1067 game.nextTurn(0, 0);1068 expect(game.isDraw()).to.equal(false);1069 game.nextTurn(0, 1);1070 expect(game.isDraw()).to.equal(false);1071 game.nextTurn(0, 0);1072 expect(game.isDraw()).to.equal(false);1073 game.nextTurn(1, 2);1074 expect(game.isDraw()).to.equal(false);1075 game.nextTurn(1, 2);1076 expect(game.isDraw()).to.equal(false);1077 game.nextTurn(1, 1);1078 expect(game.isDraw()).to.equal(false);1079 game.nextTurn(0, 2);1080 expect(game.isDraw()).to.equal(false);1081 game.nextTurn(2, 1);1082 expect(game.isDraw()).to.equal(false);1083 game.nextTurn(1, 0);1084 expect(game.isDraw()).to.equal(false);1085 game.nextTurn(1, 1);1086 expect(game.isDraw()).to.equal(false);1087 game.nextTurn(2, 1);1088 expect(game.isDraw()).to.equal(false);1089 game.nextTurn(0, 1);1090 expect(game.isDraw()).to.equal(false);1091 game.nextTurn(2, 2);1092 expect(game.isDraw()).to.equal(false);1093 game.nextTurn(2, 1);1094 expect(game.isDraw()).to.equal(false);1095 game.nextTurn(0, 0);1096 expect(game.isDraw()).to.equal(false);1097 game.nextTurn(1, 1);1098 expect(game.isDraw()).to.equal(false);1099 game.nextTurn(0, 1);1100 expect(game.isDraw()).to.equal(false);1101 game.nextTurn(2, 0);1102 expect(game.isDraw()).to.equal(false);1103 game = new TicTacToe();1104 game.nextTurn(0, 0);1105 expect(game.isDraw()).to.equal(false);1106 game.nextTurn(2, 2);1107 expect(game.isDraw()).to.equal(false);1108 game.nextTurn(2, 1);1109 expect(game.isDraw()).to.equal(false);1110 game.nextTurn(0, 1);1111 expect(game.isDraw()).to.equal(false);1112 game.nextTurn(2, 2);1113 expect(game.isDraw()).to.equal(false);1114 game.nextTurn(1, 2);1115 expect(game.isDraw()).to.equal(false);1116 game.nextTurn(1, 2);1117 expect(game.isDraw()).to.equal(false);1118 game.nextTurn(0, 1);1119 expect(game.isDraw()).to.equal(false);1120 game.nextTurn(2, 2);1121 expect(game.isDraw()).to.equal(false);1122 game.nextTurn(1, 0);1123 expect(game.isDraw()).to.equal(false);1124 game.nextTurn(2, 0);1125 expect(game.isDraw()).to.equal(false);1126 game.nextTurn(2, 1);1127 expect(game.isDraw()).to.equal(false);1128 game.nextTurn(1, 0);1129 expect(game.isDraw()).to.equal(false);1130 game.nextTurn(2, 2);1131 expect(game.isDraw()).to.equal(false);1132 game.nextTurn(0, 2);1133 expect(game.isDraw()).to.equal(false);1134 game.nextTurn(1, 1);1135 expect(game.isDraw()).to.equal(true);1136 game = new TicTacToe();1137 game.nextTurn(2, 0);1138 expect(game.isDraw()).to.equal(false);1139 game.nextTurn(2, 1);1140 expect(game.isDraw()).to.equal(false);1141 game.nextTurn(0, 0);1142 expect(game.isDraw()).to.equal(false);1143 game.nextTurn(2, 0);1144 expect(game.isDraw()).to.equal(false);1145 game.nextTurn(1, 1);1146 expect(game.isDraw()).to.equal(false);1147 game.nextTurn(2, 0);1148 expect(game.isDraw()).to.equal(false);1149 game.nextTurn(0, 2);1150 expect(game.isDraw()).to.equal(false);1151 game.nextTurn(0, 1);1152 expect(game.isDraw()).to.equal(false);1153 });1154 });1155 describe('#noMoreTurns', () => {1156 it('should true if game field is full and false otherwise', () => {1157 let game;1158 game = new TicTacToe();1159 game.nextTurn(2, 0);1160 expect(game.noMoreTurns()).to.equal(false);1161 game.nextTurn(0, 1);1162 expect(game.noMoreTurns()).to.equal(false);1163 game.nextTurn(0, 1);1164 expect(game.noMoreTurns()).to.equal(false);1165 game.nextTurn(0, 0);1166 expect(game.noMoreTurns()).to.equal(false);1167 game.nextTurn(2, 2);1168 expect(game.noMoreTurns()).to.equal(false);1169 game.nextTurn(0, 2);1170 expect(game.noMoreTurns()).to.equal(false);1171 game.nextTurn(1, 1);1172 expect(game.noMoreTurns()).to.equal(false);1173 game.nextTurn(0, 2);1174 expect(game.noMoreTurns()).to.equal(false);1175 game.nextTurn(1, 0);1176 expect(game.noMoreTurns()).to.equal(false);1177 game = new TicTacToe();1178 game.nextTurn(1, 0);1179 expect(game.noMoreTurns()).to.equal(false);1180 game.nextTurn(1, 2);1181 expect(game.noMoreTurns()).to.equal(false);1182 game.nextTurn(0, 0);1183 expect(game.noMoreTurns()).to.equal(false);1184 game.nextTurn(2, 1);1185 expect(game.noMoreTurns()).to.equal(false);1186 game.nextTurn(1, 2);1187 expect(game.noMoreTurns()).to.equal(false);1188 game.nextTurn(0, 2);1189 expect(game.noMoreTurns()).to.equal(false);1190 game.nextTurn(0, 0);1191 expect(game.noMoreTurns()).to.equal(false);1192 game.nextTurn(2, 2);1193 expect(game.noMoreTurns()).to.equal(false);1194 game.nextTurn(2, 0);1195 expect(game.noMoreTurns()).to.equal(false);1196 game = new TicTacToe();1197 game.nextTurn(2, 1);1198 expect(game.noMoreTurns()).to.equal(false);1199 game.nextTurn(1, 0);1200 expect(game.noMoreTurns()).to.equal(false);1201 game.nextTurn(0, 2);1202 expect(game.noMoreTurns()).to.equal(false);1203 game.nextTurn(2, 1);1204 expect(game.noMoreTurns()).to.equal(false);1205 game.nextTurn(2, 2);1206 expect(game.noMoreTurns()).to.equal(false);1207 game.nextTurn(2, 0);1208 expect(game.noMoreTurns()).to.equal(false);1209 game.nextTurn(2, 0);1210 expect(game.noMoreTurns()).to.equal(false);1211 game.nextTurn(1, 1);1212 expect(game.noMoreTurns()).to.equal(false);1213 game.nextTurn(1, 0);1214 expect(game.noMoreTurns()).to.equal(false);1215 game.nextTurn(2, 1);1216 expect(game.noMoreTurns()).to.equal(false);1217 game.nextTurn(1, 2);1218 expect(game.noMoreTurns()).to.equal(false);1219 game.nextTurn(2, 0);1220 expect(game.noMoreTurns()).to.equal(false);1221 game.nextTurn(0, 1);1222 expect(game.noMoreTurns()).to.equal(false);1223 game.nextTurn(2, 1);1224 expect(game.noMoreTurns()).to.equal(false);1225 game.nextTurn(2, 0);1226 expect(game.noMoreTurns()).to.equal(false);1227 game.nextTurn(1, 2);1228 expect(game.noMoreTurns()).to.equal(false);1229 game.nextTurn(2, 2);1230 expect(game.noMoreTurns()).to.equal(false);1231 game.nextTurn(2, 1);1232 expect(game.noMoreTurns()).to.equal(false);1233 game.nextTurn(0, 2);1234 expect(game.noMoreTurns()).to.equal(false);1235 game.nextTurn(0, 1);1236 expect(game.noMoreTurns()).to.equal(false);1237 game.nextTurn(2, 1);1238 expect(game.noMoreTurns()).to.equal(false);1239 game.nextTurn(1, 2);1240 expect(game.noMoreTurns()).to.equal(false);1241 game.nextTurn(0, 2);1242 expect(game.noMoreTurns()).to.equal(false);1243 game.nextTurn(1, 1);1244 expect(game.noMoreTurns()).to.equal(false);1245 game.nextTurn(2, 1);1246 expect(game.noMoreTurns()).to.equal(false);1247 game.nextTurn(1, 2);1248 expect(game.noMoreTurns()).to.equal(false);1249 game.nextTurn(1, 0);1250 expect(game.noMoreTurns()).to.equal(false);1251 game.nextTurn(0, 2);1252 expect(game.noMoreTurns()).to.equal(false);1253 game.nextTurn(2, 2);1254 expect(game.noMoreTurns()).to.equal(false);1255 game.nextTurn(1, 2);1256 expect(game.noMoreTurns()).to.equal(false);1257 game.nextTurn(0, 1);1258 expect(game.noMoreTurns()).to.equal(false);1259 game.nextTurn(1, 2);1260 expect(game.noMoreTurns()).to.equal(false);1261 game.nextTurn(2, 1);1262 expect(game.noMoreTurns()).to.equal(false);1263 game.nextTurn(0, 1);1264 expect(game.noMoreTurns()).to.equal(false);1265 game.nextTurn(1, 1);1266 expect(game.noMoreTurns()).to.equal(false);1267 game.nextTurn(1, 2);1268 expect(game.noMoreTurns()).to.equal(false);1269 game.nextTurn(0, 1);1270 expect(game.noMoreTurns()).to.equal(false);1271 game.nextTurn(1, 2);1272 expect(game.noMoreTurns()).to.equal(false);1273 game.nextTurn(2, 0);1274 expect(game.noMoreTurns()).to.equal(false);1275 game.nextTurn(2, 1);1276 expect(game.noMoreTurns()).to.equal(false);1277 game.nextTurn(0, 0);1278 expect(game.noMoreTurns()).to.equal(true);1279 game = new TicTacToe();1280 game.nextTurn(1, 0);1281 expect(game.noMoreTurns()).to.equal(false);1282 game.nextTurn(1, 2);1283 expect(game.noMoreTurns()).to.equal(false);1284 game.nextTurn(1, 0);1285 expect(game.noMoreTurns()).to.equal(false);1286 game.nextTurn(0, 1);1287 expect(game.noMoreTurns()).to.equal(false);1288 game.nextTurn(2, 1);1289 expect(game.noMoreTurns()).to.equal(false);1290 game.nextTurn(2, 1);1291 expect(game.noMoreTurns()).to.equal(false);1292 game.nextTurn(0, 1);1293 expect(game.noMoreTurns()).to.equal(false);1294 game.nextTurn(1, 1);1295 expect(game.noMoreTurns()).to.equal(false);1296 game.nextTurn(1, 0);1297 expect(game.noMoreTurns()).to.equal(false);1298 game.nextTurn(1, 1);1299 expect(game.noMoreTurns()).to.equal(false);1300 game.nextTurn(0, 1);1301 expect(game.noMoreTurns()).to.equal(false);1302 game.nextTurn(1, 1);1303 expect(game.noMoreTurns()).to.equal(false);1304 game.nextTurn(1, 0);1305 expect(game.noMoreTurns()).to.equal(false);1306 game.nextTurn(2, 1);1307 expect(game.noMoreTurns()).to.equal(false);1308 game.nextTurn(1, 2);1309 expect(game.noMoreTurns()).to.equal(false);1310 game.nextTurn(2, 2);1311 expect(game.noMoreTurns()).to.equal(false);1312 game.nextTurn(1, 1);1313 expect(game.noMoreTurns()).to.equal(false);1314 game.nextTurn(0, 1);1315 expect(game.noMoreTurns()).to.equal(false);1316 game.nextTurn(0, 1);1317 expect(game.noMoreTurns()).to.equal(false);1318 game.nextTurn(0, 0);1319 expect(game.noMoreTurns()).to.equal(false);1320 game.nextTurn(0, 1);1321 expect(game.noMoreTurns()).to.equal(false);1322 game.nextTurn(2, 0);1323 expect(game.noMoreTurns()).to.equal(false);1324 game = new TicTacToe();1325 game.nextTurn(2, 0);1326 expect(game.noMoreTurns()).to.equal(false);1327 game.nextTurn(2, 2);1328 expect(game.noMoreTurns()).to.equal(false);1329 game.nextTurn(2, 2);1330 expect(game.noMoreTurns()).to.equal(false);1331 game.nextTurn(0, 2);1332 expect(game.noMoreTurns()).to.equal(false);1333 game.nextTurn(2, 2);1334 expect(game.noMoreTurns()).to.equal(false);1335 game.nextTurn(1, 1);1336 expect(game.noMoreTurns()).to.equal(false);1337 game.nextTurn(2, 0);1338 expect(game.noMoreTurns()).to.equal(false);1339 game.nextTurn(2, 2);1340 expect(game.noMoreTurns()).to.equal(false);1341 game.nextTurn(2, 1);1342 expect(game.noMoreTurns()).to.equal(false);1343 game.nextTurn(0, 2);1344 expect(game.noMoreTurns()).to.equal(false);1345 game.nextTurn(2, 0);1346 expect(game.noMoreTurns()).to.equal(false);1347 game.nextTurn(0, 0);1348 expect(game.noMoreTurns()).to.equal(false);1349 game = new TicTacToe();1350 game.nextTurn(2, 1);1351 expect(game.noMoreTurns()).to.equal(false);1352 game.nextTurn(0, 2);1353 expect(game.noMoreTurns()).to.equal(false);1354 game.nextTurn(1, 0);1355 expect(game.noMoreTurns()).to.equal(false);1356 game.nextTurn(2, 2);1357 expect(game.noMoreTurns()).to.equal(false);1358 game.nextTurn(0, 1);1359 expect(game.noMoreTurns()).to.equal(false);1360 game.nextTurn(1, 2);1361 expect(game.noMoreTurns()).to.equal(false);1362 game = new TicTacToe();1363 game.nextTurn(1, 2);1364 expect(game.noMoreTurns()).to.equal(false);1365 game.nextTurn(0, 1);1366 expect(game.noMoreTurns()).to.equal(false);1367 game.nextTurn(2, 0);1368 expect(game.noMoreTurns()).to.equal(false);1369 game.nextTurn(1, 0);1370 expect(game.noMoreTurns()).to.equal(false);1371 game.nextTurn(0, 0);1372 expect(game.noMoreTurns()).to.equal(false);1373 game.nextTurn(1, 0);1374 expect(game.noMoreTurns()).to.equal(false);1375 game.nextTurn(2, 1);1376 expect(game.noMoreTurns()).to.equal(false);1377 game.nextTurn(0, 1);1378 expect(game.noMoreTurns()).to.equal(false);1379 game.nextTurn(0, 1);1380 expect(game.noMoreTurns()).to.equal(false);1381 game.nextTurn(0, 1);1382 expect(game.noMoreTurns()).to.equal(false);1383 game.nextTurn(2, 1);1384 expect(game.noMoreTurns()).to.equal(false);1385 game.nextTurn(0, 1);1386 expect(game.noMoreTurns()).to.equal(false);1387 game.nextTurn(2, 1);1388 expect(game.noMoreTurns()).to.equal(false);1389 game.nextTurn(2, 2);1390 expect(game.noMoreTurns()).to.equal(false);1391 game.nextTurn(0, 1);1392 expect(game.noMoreTurns()).to.equal(false);1393 game.nextTurn(2, 1);1394 expect(game.noMoreTurns()).to.equal(false);1395 game.nextTurn(2, 2);1396 expect(game.noMoreTurns()).to.equal(false);1397 game.nextTurn(2, 0);1398 expect(game.noMoreTurns()).to.equal(false);1399 game.nextTurn(0, 2);1400 expect(game.noMoreTurns()).to.equal(false);1401 game.nextTurn(1, 1);1402 expect(game.noMoreTurns()).to.equal(true);1403 game = new TicTacToe();1404 game.nextTurn(0, 0);1405 expect(game.noMoreTurns()).to.equal(false);1406 game.nextTurn(2, 1);1407 expect(game.noMoreTurns()).to.equal(false);1408 game.nextTurn(1, 2);1409 expect(game.noMoreTurns()).to.equal(false);1410 game.nextTurn(0, 1);1411 expect(game.noMoreTurns()).to.equal(false);1412 game.nextTurn(1, 0);1413 expect(game.noMoreTurns()).to.equal(false);1414 game.nextTurn(1, 0);1415 expect(game.noMoreTurns()).to.equal(false);1416 game.nextTurn(2, 1);1417 expect(game.noMoreTurns()).to.equal(false);1418 game.nextTurn(1, 2);1419 expect(game.noMoreTurns()).to.equal(false);1420 game.nextTurn(2, 0);1421 expect(game.noMoreTurns()).to.equal(false);1422 game.nextTurn(0, 0);1423 expect(game.noMoreTurns()).to.equal(false);1424 game.nextTurn(2, 0);1425 expect(game.noMoreTurns()).to.equal(false);1426 game.nextTurn(2, 2);1427 expect(game.noMoreTurns()).to.equal(false);1428 game.nextTurn(0, 2);1429 expect(game.noMoreTurns()).to.equal(false);1430 game.nextTurn(0, 1);1431 expect(game.noMoreTurns()).to.equal(false);1432 game.nextTurn(1, 1);1433 expect(game.noMoreTurns()).to.equal(true);1434 game = new TicTacToe();1435 game.nextTurn(0, 1);1436 expect(game.noMoreTurns()).to.equal(false);1437 game.nextTurn(2, 0);1438 expect(game.noMoreTurns()).to.equal(false);1439 game.nextTurn(1, 2);1440 expect(game.noMoreTurns()).to.equal(false);1441 game.nextTurn(1, 1);1442 expect(game.noMoreTurns()).to.equal(false);1443 game.nextTurn(1, 1);1444 expect(game.noMoreTurns()).to.equal(false);1445 game.nextTurn(1, 0);1446 expect(game.noMoreTurns()).to.equal(false);1447 game.nextTurn(2, 1);1448 expect(game.noMoreTurns()).to.equal(false);1449 game.nextTurn(2, 2);1450 expect(game.noMoreTurns()).to.equal(false);1451 game.nextTurn(2, 2);1452 expect(game.noMoreTurns()).to.equal(false);1453 game.nextTurn(0, 0);1454 expect(game.noMoreTurns()).to.equal(false);1455 game.nextTurn(0, 0);1456 expect(game.noMoreTurns()).to.equal(false);1457 game.nextTurn(2, 2);1458 expect(game.noMoreTurns()).to.equal(false);1459 game.nextTurn(0, 1);1460 expect(game.noMoreTurns()).to.equal(false);1461 game.nextTurn(0, 0);1462 expect(game.noMoreTurns()).to.equal(false);1463 game.nextTurn(1, 0);1464 expect(game.noMoreTurns()).to.equal(false);1465 game.nextTurn(0, 1);1466 expect(game.noMoreTurns()).to.equal(false);1467 game.nextTurn(0, 1);1468 expect(game.noMoreTurns()).to.equal(false);1469 game.nextTurn(0, 2);1470 expect(game.noMoreTurns()).to.equal(true);1471 game = new TicTacToe();1472 game.nextTurn(2, 2);1473 expect(game.noMoreTurns()).to.equal(false);1474 game.nextTurn(1, 2);1475 expect(game.noMoreTurns()).to.equal(false);1476 game.nextTurn(0, 1);1477 expect(game.noMoreTurns()).to.equal(false);1478 game.nextTurn(2, 1);1479 expect(game.noMoreTurns()).to.equal(false);1480 game.nextTurn(2, 0);1481 expect(game.noMoreTurns()).to.equal(false);1482 game.nextTurn(0, 1);1483 expect(game.noMoreTurns()).to.equal(false);1484 game.nextTurn(0, 0);1485 expect(game.noMoreTurns()).to.equal(false);1486 game.nextTurn(2, 0);1487 expect(game.noMoreTurns()).to.equal(false);1488 game.nextTurn(0, 0);1489 expect(game.noMoreTurns()).to.equal(false);1490 game.nextTurn(1, 2);1491 expect(game.noMoreTurns()).to.equal(false);1492 game.nextTurn(2, 2);1493 expect(game.noMoreTurns()).to.equal(false);1494 game.nextTurn(2, 2);1495 expect(game.noMoreTurns()).to.equal(false);1496 game.nextTurn(2, 2);1497 expect(game.noMoreTurns()).to.equal(false);1498 game.nextTurn(1, 0);1499 expect(game.noMoreTurns()).to.equal(false);1500 game.nextTurn(2, 0);1501 expect(game.noMoreTurns()).to.equal(false);1502 game.nextTurn(1, 1);1503 expect(game.noMoreTurns()).to.equal(false);1504 game.nextTurn(1, 0);1505 expect(game.noMoreTurns()).to.equal(false);1506 game.nextTurn(1, 2);1507 expect(game.noMoreTurns()).to.equal(false);1508 game.nextTurn(0, 2);1509 expect(game.noMoreTurns()).to.equal(true);1510 });1511 });1512 describe('#getWinner', () => {1513 it('should return winner of the game or null', () => {1514 let game;1515 game = new TicTacToe();1516 game.nextTurn(1, 0)1517 expect(game.getWinner()).to.equal(null)1518 game.nextTurn(1, 2)1519 expect(game.getWinner()).to.equal(null)1520 game.nextTurn(2, 1)1521 expect(game.getWinner()).to.equal(null)1522 game.nextTurn(1, 2)1523 expect(game.getWinner()).to.equal(null)1524 game.nextTurn(1, 1)1525 expect(game.getWinner()).to.equal(null)1526 game.nextTurn(0, 1)1527 expect(game.getWinner()).to.equal(null)1528 game.nextTurn(2, 0)1529 expect(game.getWinner()).to.equal(null)1530 game.nextTurn(0, 1)1531 expect(game.getWinner()).to.equal(null)1532 game.nextTurn(2, 2)1533 expect(game.getWinner()).to.equal(null)1534 game.nextTurn(0, 1)1535 expect(game.getWinner()).to.equal(null)1536 game.nextTurn(1, 1)1537 expect(game.getWinner()).to.equal(null)1538 game.nextTurn(2, 0)1539 expect(game.getWinner()).to.equal(null)1540 game.nextTurn(0, 2)1541 expect(game.getWinner()).to.equal('o')1542 game = new TicTacToe();1543 game.nextTurn(2, 1)1544 expect(game.getWinner()).to.equal(null)1545 game.nextTurn(2, 0)1546 expect(game.getWinner()).to.equal(null)1547 game.nextTurn(2, 1)1548 expect(game.getWinner()).to.equal(null)1549 game.nextTurn(1, 2)1550 expect(game.getWinner()).to.equal(null)1551 game.nextTurn(0, 0)1552 expect(game.getWinner()).to.equal(null)1553 game.nextTurn(2, 1)1554 expect(game.getWinner()).to.equal(null)1555 game.nextTurn(1, 1)1556 expect(game.getWinner()).to.equal(null)1557 game.nextTurn(1, 1)1558 expect(game.getWinner()).to.equal(null)1559 game.nextTurn(1, 0)1560 expect(game.getWinner()).to.equal('o')1561 game = new TicTacToe();1562 game.nextTurn(1, 0)1563 expect(game.getWinner()).to.equal(null)1564 game.nextTurn(1, 1)1565 expect(game.getWinner()).to.equal(null)1566 game.nextTurn(2, 0)1567 expect(game.getWinner()).to.equal(null)1568 game.nextTurn(0, 0)1569 expect(game.getWinner()).to.equal(null)1570 game.nextTurn(0, 0)1571 expect(game.getWinner()).to.equal(null)1572 game.nextTurn(1, 2)1573 expect(game.getWinner()).to.equal(null)1574 game.nextTurn(0, 2)1575 expect(game.getWinner()).to.equal(null)1576 game.nextTurn(2, 1)1577 expect(game.getWinner()).to.equal(null)1578 game.nextTurn(2, 1)1579 expect(game.getWinner()).to.equal(null)1580 game.nextTurn(0, 0)1581 expect(game.getWinner()).to.equal(null)1582 game.nextTurn(0, 2)1583 expect(game.getWinner()).to.equal(null)1584 game.nextTurn(2, 2)1585 expect(game.getWinner()).to.equal('o')1586 game = new TicTacToe();1587 game.nextTurn(1, 1)1588 expect(game.getWinner()).to.equal(null)1589 game.nextTurn(2, 2)1590 expect(game.getWinner()).to.equal(null)1591 game.nextTurn(0, 0)1592 expect(game.getWinner()).to.equal(null)1593 game.nextTurn(0, 2)1594 expect(game.getWinner()).to.equal(null)1595 game.nextTurn(0, 2)1596 expect(game.getWinner()).to.equal(null)1597 game.nextTurn(0, 2)1598 expect(game.getWinner()).to.equal(null)1599 game.nextTurn(2, 1)1600 expect(game.getWinner()).to.equal(null)1601 game.nextTurn(0, 2)1602 expect(game.getWinner()).to.equal(null)1603 game.nextTurn(0, 2)1604 expect(game.getWinner()).to.equal(null)1605 game.nextTurn(2, 2)1606 expect(game.getWinner()).to.equal(null)1607 game.nextTurn(0, 2)1608 expect(game.getWinner()).to.equal(null)1609 game.nextTurn(2, 2)1610 expect(game.getWinner()).to.equal(null)1611 game.nextTurn(1, 2)1612 expect(game.getWinner()).to.equal('o')1613 game = new TicTacToe();1614 game.nextTurn(2, 2)1615 expect(game.getWinner()).to.equal(null)1616 game.nextTurn(1, 1)1617 expect(game.getWinner()).to.equal(null)1618 game.nextTurn(0, 2)1619 expect(game.getWinner()).to.equal(null)1620 game.nextTurn(0, 0)1621 expect(game.getWinner()).to.equal(null)1622 game.nextTurn(0, 1)1623 expect(game.getWinner()).to.equal(null)1624 game.nextTurn(2, 2)1625 expect(game.getWinner()).to.equal(null)1626 game.nextTurn(0, 1)1627 expect(game.getWinner()).to.equal(null)1628 game.nextTurn(2, 2)1629 expect(game.getWinner()).to.equal(null)1630 game.nextTurn(2, 1)1631 expect(game.getWinner()).to.equal(null)1632 game.nextTurn(1, 2)1633 expect(game.getWinner()).to.equal('x')1634 game = new TicTacToe();1635 game.nextTurn(0, 1)1636 expect(game.getWinner()).to.equal(null)1637 game.nextTurn(2, 0)1638 expect(game.getWinner()).to.equal(null)1639 game.nextTurn(1, 1)1640 expect(game.getWinner()).to.equal(null)1641 game.nextTurn(2, 1)1642 expect(game.getWinner()).to.equal(null)1643 game.nextTurn(2, 0)1644 expect(game.getWinner()).to.equal(null)1645 game.nextTurn(0, 0)1646 expect(game.getWinner()).to.equal(null)1647 game.nextTurn(2, 1)1648 expect(game.getWinner()).to.equal(null)1649 game.nextTurn(0, 2)1650 expect(game.getWinner()).to.equal(null)1651 game.nextTurn(1, 2)1652 expect(game.getWinner()).to.equal(null)1653 game.nextTurn(1, 2)1654 expect(game.getWinner()).to.equal(null)1655 game.nextTurn(1, 2)1656 expect(game.getWinner()).to.equal(null)1657 game.nextTurn(0, 1)1658 expect(game.getWinner()).to.equal(null)1659 game.nextTurn(1, 2)1660 expect(game.getWinner()).to.equal(null)1661 game.nextTurn(1, 2)1662 expect(game.getWinner()).to.equal(null)1663 game.nextTurn(1, 0)1664 expect(game.getWinner()).to.equal(null)1665 game.nextTurn(2, 1)1666 expect(game.getWinner()).to.equal(null)1667 game.nextTurn(0, 1)1668 expect(game.getWinner()).to.equal(null)1669 game.nextTurn(2, 1)1670 expect(game.getWinner()).to.equal(null)1671 game.nextTurn(1, 1)1672 expect(game.getWinner()).to.equal(null)1673 game.nextTurn(1, 2)1674 expect(game.getWinner()).to.equal(null)1675 game.nextTurn(1, 1)1676 expect(game.getWinner()).to.equal(null)1677 game.nextTurn(1, 1)1678 expect(game.getWinner()).to.equal(null)1679 game.nextTurn(0, 0)1680 expect(game.getWinner()).to.equal(null)1681 game.nextTurn(0, 0)1682 expect(game.getWinner()).to.equal(null)1683 game.nextTurn(0, 1)1684 expect(game.getWinner()).to.equal(null)1685 game.nextTurn(0, 0)1686 expect(game.getWinner()).to.equal(null)1687 game.nextTurn(1, 2)1688 expect(game.getWinner()).to.equal(null)1689 game.nextTurn(1, 1)1690 expect(game.getWinner()).to.equal(null)1691 game.nextTurn(1, 1)1692 expect(game.getWinner()).to.equal(null)1693 game.nextTurn(1, 1)1694 expect(game.getWinner()).to.equal(null)1695 game.nextTurn(0, 2)1696 expect(game.getWinner()).to.equal(null)1697 game.nextTurn(0, 1)1698 expect(game.getWinner()).to.equal(null)1699 game.nextTurn(0, 2)1700 expect(game.getWinner()).to.equal(null)1701 game.nextTurn(0, 1)1702 expect(game.getWinner()).to.equal(null)1703 game.nextTurn(0, 2)1704 expect(game.getWinner()).to.equal(null)1705 game.nextTurn(2, 1)1706 expect(game.getWinner()).to.equal(null)1707 game.nextTurn(1, 2)1708 expect(game.getWinner()).to.equal(null)1709 game.nextTurn(0, 1)1710 expect(game.getWinner()).to.equal(null)1711 game.nextTurn(1, 0)1712 expect(game.getWinner()).to.equal(null)1713 game.nextTurn(0, 1)1714 expect(game.getWinner()).to.equal(null)1715 game.nextTurn(1, 0)1716 expect(game.getWinner()).to.equal(null)1717 game.nextTurn(2, 1)1718 expect(game.getWinner()).to.equal(null)1719 game.nextTurn(2, 0)1720 expect(game.getWinner()).to.equal(null)1721 game.nextTurn(2, 1)1722 expect(game.getWinner()).to.equal(null)1723 game.nextTurn(2, 0)1724 expect(game.getWinner()).to.equal(null)1725 game.nextTurn(0, 1)1726 expect(game.getWinner()).to.equal(null)1727 game.nextTurn(2, 1)1728 expect(game.getWinner()).to.equal(null)1729 game.nextTurn(2, 0)1730 expect(game.getWinner()).to.equal(null)1731 game.nextTurn(1, 1)1732 expect(game.getWinner()).to.equal(null)1733 game.nextTurn(1, 0)1734 expect(game.getWinner()).to.equal(null)1735 game.nextTurn(2, 2)1736 expect(game.getWinner()).to.equal('x')1737 game = new TicTacToe();1738 game.nextTurn(2, 1)1739 expect(game.getWinner()).to.equal(null)1740 game.nextTurn(2, 0)1741 expect(game.getWinner()).to.equal(null)1742 game.nextTurn(0, 0)1743 expect(game.getWinner()).to.equal(null)1744 game.nextTurn(0, 0)1745 expect(game.getWinner()).to.equal(null)1746 game.nextTurn(2, 1)1747 expect(game.getWinner()).to.equal(null)1748 game.nextTurn(0, 1)1749 expect(game.getWinner()).to.equal(null)1750 game.nextTurn(1, 1)1751 expect(game.getWinner()).to.equal(null)1752 game.nextTurn(2, 2)1753 expect(game.getWinner()).to.equal(null)1754 game.nextTurn(1, 0)1755 expect(game.getWinner()).to.equal(null)1756 game.nextTurn(0, 1)1757 expect(game.getWinner()).to.equal(null)1758 game.nextTurn(2, 2)1759 expect(game.getWinner()).to.equal(null)1760 game.nextTurn(0, 0)1761 expect(game.getWinner()).to.equal(null)1762 game.nextTurn(2, 1)1763 expect(game.getWinner()).to.equal(null)1764 game.nextTurn(0, 2)1765 expect(game.getWinner()).to.equal(null)1766 game.nextTurn(0, 1)1767 expect(game.getWinner()).to.equal(null)1768 game.nextTurn(2, 0)1769 expect(game.getWinner()).to.equal(null)1770 game.nextTurn(0, 1)1771 expect(game.getWinner()).to.equal(null)1772 game.nextTurn(2, 1)1773 expect(game.getWinner()).to.equal(null)1774 game.nextTurn(2, 1)1775 expect(game.getWinner()).to.equal(null)1776 game.nextTurn(2, 0)1777 expect(game.getWinner()).to.equal(null)1778 game.nextTurn(1, 2)1779 expect(game.getWinner()).to.equal('x')1780 game = new TicTacToe();1781 game.nextTurn(1, 2)1782 expect(game.getWinner()).to.equal(null)1783 game.nextTurn(1, 1)1784 expect(game.getWinner()).to.equal(null)1785 game.nextTurn(0, 0)1786 expect(game.getWinner()).to.equal(null)1787 game.nextTurn(2, 1)1788 expect(game.getWinner()).to.equal(null)1789 game.nextTurn(1, 1)1790 expect(game.getWinner()).to.equal(null)1791 game.nextTurn(2, 2)1792 expect(game.getWinner()).to.equal(null)1793 game.nextTurn(1, 0)1794 expect(game.getWinner()).to.equal(null)1795 game.nextTurn(0, 1)1796 expect(game.getWinner()).to.equal(null)1797 game.nextTurn(2, 1)1798 expect(game.getWinner()).to.equal(null)1799 game.nextTurn(0, 2)1800 expect(game.getWinner()).to.equal(null)1801 game.nextTurn(1, 1)1802 expect(game.getWinner()).to.equal(null)1803 game.nextTurn(0, 2)1804 expect(game.getWinner()).to.equal(null)1805 game.nextTurn(2, 2)1806 expect(game.getWinner()).to.equal(null)1807 game.nextTurn(2, 0)1808 expect(game.getWinner()).to.equal(null)1809 game = new TicTacToe();1810 game.nextTurn(1, 1)1811 expect(game.getWinner()).to.equal(null)1812 game.nextTurn(1, 0)1813 expect(game.getWinner()).to.equal(null)1814 game.nextTurn(0, 0)1815 expect(game.getWinner()).to.equal(null)1816 game.nextTurn(1, 1)1817 expect(game.getWinner()).to.equal(null)1818 game.nextTurn(2, 1)1819 expect(game.getWinner()).to.equal(null)1820 game.nextTurn(2, 0)1821 expect(game.getWinner()).to.equal(null)1822 game.nextTurn(1, 1)1823 expect(game.getWinner()).to.equal(null)1824 game.nextTurn(1, 0)1825 expect(game.getWinner()).to.equal(null)1826 game.nextTurn(1, 1)1827 expect(game.getWinner()).to.equal(null)1828 game.nextTurn(2, 2)1829 expect(game.getWinner()).to.equal(null)1830 game.nextTurn(1, 1)1831 expect(game.getWinner()).to.equal(null)1832 game.nextTurn(1, 1)1833 expect(game.getWinner()).to.equal(null)1834 game.nextTurn(2, 2)1835 expect(game.getWinner()).to.equal(null)1836 game.nextTurn(0, 0)1837 expect(game.getWinner()).to.equal(null)1838 game.nextTurn(2, 2)1839 expect(game.getWinner()).to.equal(null)1840 game.nextTurn(2, 1)1841 expect(game.getWinner()).to.equal(null)1842 game.nextTurn(1, 2)1843 expect(game.getWinner()).to.equal(null)1844 game.nextTurn(1, 2)1845 expect(game.getWinner()).to.equal(null)1846 game.nextTurn(0, 0)1847 expect(game.getWinner()).to.equal(null)1848 game.nextTurn(2, 0)1849 expect(game.getWinner()).to.equal(null)1850 game.nextTurn(1, 2)1851 expect(game.getWinner()).to.equal(null)1852 game.nextTurn(1, 1)1853 expect(game.getWinner()).to.equal(null)1854 game.nextTurn(1, 0)1855 expect(game.getWinner()).to.equal(null)1856 game.nextTurn(2, 1)1857 expect(game.getWinner()).to.equal(null)1858 game.nextTurn(2, 2)1859 expect(game.getWinner()).to.equal(null)1860 game.nextTurn(0, 1)1861 expect(game.getWinner()).to.equal(null)1862 game.nextTurn(2, 2)1863 expect(game.getWinner()).to.equal(null)1864 game.nextTurn(1, 2)1865 expect(game.getWinner()).to.equal(null)1866 game.nextTurn(1, 0)1867 expect(game.getWinner()).to.equal(null)1868 game.nextTurn(2, 2)1869 expect(game.getWinner()).to.equal(null)1870 game.nextTurn(2, 1)1871 expect(game.getWinner()).to.equal(null)1872 game.nextTurn(2, 2)1873 expect(game.getWinner()).to.equal(null)1874 game.nextTurn(0, 0)1875 expect(game.getWinner()).to.equal(null)1876 game.nextTurn(0, 1)1877 expect(game.getWinner()).to.equal(null)1878 game.nextTurn(2, 0)1879 expect(game.getWinner()).to.equal(null)1880 game.nextTurn(2, 0)1881 expect(game.getWinner()).to.equal(null)1882 game.nextTurn(1, 2)1883 expect(game.getWinner()).to.equal(null)1884 game.nextTurn(1, 1)1885 expect(game.getWinner()).to.equal(null)1886 game.nextTurn(1, 1)1887 expect(game.getWinner()).to.equal(null)1888 game.nextTurn(1, 0)1889 expect(game.getWinner()).to.equal(null)1890 game.nextTurn(0, 2)1891 expect(game.getWinner()).to.equal('x')1892 game = new TicTacToe();1893 game.nextTurn(2, 1)1894 expect(game.getWinner()).to.equal(null)1895 game.nextTurn(1, 0)1896 expect(game.getWinner()).to.equal(null)1897 game.nextTurn(2, 2)1898 expect(game.getWinner()).to.equal(null)1899 game.nextTurn(1, 0)1900 expect(game.getWinner()).to.equal(null)1901 game.nextTurn(0, 1)1902 expect(game.getWinner()).to.equal(null)1903 game.nextTurn(1, 1)1904 expect(game.getWinner()).to.equal(null)1905 game.nextTurn(0, 1)1906 expect(game.getWinner()).to.equal(null)1907 game.nextTurn(2, 2)1908 expect(game.getWinner()).to.equal(null)1909 game.nextTurn(0, 2)1910 expect(game.getWinner()).to.equal(null)1911 game.nextTurn(2, 1)1912 expect(game.getWinner()).to.equal(null)1913 game.nextTurn(0, 2)1914 expect(game.getWinner()).to.equal(null)1915 game.nextTurn(0, 2)1916 expect(game.getWinner()).to.equal(null)1917 game.nextTurn(0, 1)1918 expect(game.getWinner()).to.equal(null)1919 game.nextTurn(1, 1)1920 expect(game.getWinner()).to.equal(null)1921 game.nextTurn(0, 1)1922 expect(game.getWinner()).to.equal(null)1923 game.nextTurn(0, 2)1924 expect(game.getWinner()).to.equal(null)1925 game.nextTurn(1, 1)1926 expect(game.getWinner()).to.equal(null)1927 game.nextTurn(2, 0)1928 expect(game.getWinner()).to.equal('x')1929 });1930 });1931 describe('#isFinished', () => {1932 it('should return winner of the game or null', () => {1933 let game;1934 game = new TicTacToe();1935 game.nextTurn(1, 0)1936 expect(game.isFinished()).to.equal(false)1937 game.nextTurn(0, 2)1938 expect(game.isFinished()).to.equal(false)1939 game.nextTurn(1, 1)1940 expect(game.isFinished()).to.equal(false)1941 game.nextTurn(0, 0)1942 expect(game.isFinished()).to.equal(false)1943 game.nextTurn(0, 1)1944 expect(game.isFinished()).to.equal(false)1945 game.nextTurn(0, 0)1946 expect(game.isFinished()).to.equal(false)1947 game.nextTurn(1, 1)1948 expect(game.isFinished()).to.equal(false)1949 game.nextTurn(0, 0)1950 expect(game.isFinished()).to.equal(false)1951 game.nextTurn(2, 2)1952 expect(game.isFinished()).to.equal(false)1953 game.nextTurn(2, 1)1954 expect(game.isFinished()).to.equal(true)1955 game = new TicTacToe();1956 game.nextTurn(2, 2)1957 expect(game.isFinished()).to.equal(false)1958 game.nextTurn(1, 1)1959 expect(game.isFinished()).to.equal(false)1960 game.nextTurn(2, 1)1961 expect(game.isFinished()).to.equal(false)1962 game.nextTurn(1, 2)1963 expect(game.isFinished()).to.equal(false)1964 game.nextTurn(0, 2)1965 expect(game.isFinished()).to.equal(false)1966 game.nextTurn(1, 1)1967 expect(game.isFinished()).to.equal(false)1968 game.nextTurn(0, 1)1969 expect(game.isFinished()).to.equal(false)1970 game.nextTurn(0, 0)1971 expect(game.isFinished()).to.equal(false)1972 game.nextTurn(2, 2)1973 expect(game.isFinished()).to.equal(false)1974 game.nextTurn(0, 1)1975 expect(game.isFinished()).to.equal(false)1976 game.nextTurn(2, 0)1977 expect(game.isFinished()).to.equal(false)1978 game.nextTurn(1, 0)1979 expect(game.isFinished()).to.equal(true)1980 game = new TicTacToe();1981 game.nextTurn(0, 0)1982 expect(game.isFinished()).to.equal(false)1983 game.nextTurn(0, 2)1984 expect(game.isFinished()).to.equal(false)1985 game.nextTurn(2, 2)1986 expect(game.isFinished()).to.equal(false)1987 game.nextTurn(0, 0)1988 expect(game.isFinished()).to.equal(false)1989 game.nextTurn(2, 1)1990 expect(game.isFinished()).to.equal(false)1991 game.nextTurn(1, 2)1992 expect(game.isFinished()).to.equal(false)1993 game.nextTurn(2, 2)1994 expect(game.isFinished()).to.equal(false)1995 game.nextTurn(2, 1)1996 expect(game.isFinished()).to.equal(false)1997 game.nextTurn(0, 0)1998 expect(game.isFinished()).to.equal(false)1999 game.nextTurn(0, 2)2000 expect(game.isFinished()).to.equal(false)2001 game.nextTurn(1, 2)2002 expect(game.isFinished()).to.equal(false)2003 game.nextTurn(1, 1)2004 expect(game.isFinished()).to.equal(false)2005 game.nextTurn(1, 0)2006 expect(game.isFinished()).to.equal(false)2007 game.nextTurn(1, 1)2008 expect(game.isFinished()).to.equal(false)2009 game.nextTurn(1, 2)2010 expect(game.isFinished()).to.equal(false)2011 game.nextTurn(1, 0)2012 expect(game.isFinished()).to.equal(false)2013 game.nextTurn(2, 2)2014 expect(game.isFinished()).to.equal(false)2015 game.nextTurn(0, 2)2016 expect(game.isFinished()).to.equal(false)2017 game.nextTurn(2, 0)2018 expect(game.isFinished()).to.equal(true)2019 game = new TicTacToe();2020 game.nextTurn(2, 2)2021 expect(game.isFinished()).to.equal(false)2022 game.nextTurn(0, 0)2023 expect(game.isFinished()).to.equal(false)2024 game.nextTurn(1, 2)2025 expect(game.isFinished()).to.equal(false)2026 game.nextTurn(1, 1)2027 expect(game.isFinished()).to.equal(false)2028 game.nextTurn(0, 1)2029 expect(game.isFinished()).to.equal(false)2030 game.nextTurn(1, 0)2031 expect(game.isFinished()).to.equal(false)2032 game.nextTurn(1, 1)2033 expect(game.isFinished()).to.equal(false)2034 game.nextTurn(2, 0)2035 expect(game.isFinished()).to.equal(false)2036 game.nextTurn(0, 1)2037 expect(game.isFinished()).to.equal(false)2038 game.nextTurn(1, 0)2039 expect(game.isFinished()).to.equal(false)2040 game.nextTurn(0, 2)2041 expect(game.isFinished()).to.equal(false)2042 game.nextTurn(0, 1)2043 expect(game.isFinished()).to.equal(false)2044 game.nextTurn(0, 2)2045 expect(game.isFinished()).to.equal(false)2046 game.nextTurn(0, 0)2047 expect(game.isFinished()).to.equal(false)2048 game.nextTurn(1, 2)2049 expect(game.isFinished()).to.equal(false)2050 game.nextTurn(0, 2)2051 expect(game.isFinished()).to.equal(false)2052 game.nextTurn(2, 0)2053 expect(game.isFinished()).to.equal(false)2054 game.nextTurn(2, 2)2055 expect(game.isFinished()).to.equal(false)2056 game.nextTurn(0, 2)2057 expect(game.isFinished()).to.equal(false)2058 game.nextTurn(1, 2)2059 expect(game.isFinished()).to.equal(false)2060 game.nextTurn(2, 1)2061 expect(game.isFinished()).to.equal(true)2062 game = new TicTacToe();2063 game.nextTurn(2, 2)2064 expect(game.isFinished()).to.equal(false)2065 game.nextTurn(2, 1)2066 expect(game.isFinished()).to.equal(false)2067 game.nextTurn(0, 0)2068 expect(game.isFinished()).to.equal(false)2069 game.nextTurn(1, 0)2070 expect(game.isFinished()).to.equal(false)2071 game.nextTurn(0, 2)2072 expect(game.isFinished()).to.equal(false)2073 game.nextTurn(0, 1)2074 expect(game.isFinished()).to.equal(false)2075 game.nextTurn(1, 1)2076 expect(game.isFinished()).to.equal(true)2077 game = new TicTacToe();2078 game.nextTurn(0, 2)2079 expect(game.isFinished()).to.equal(false)2080 game.nextTurn(2, 0)2081 expect(game.isFinished()).to.equal(false)2082 game.nextTurn(1, 2)2083 expect(game.isFinished()).to.equal(false)2084 game.nextTurn(2, 2)2085 expect(game.isFinished()).to.equal(false)2086 game.nextTurn(1, 1)2087 expect(game.isFinished()).to.equal(false)2088 game.nextTurn(1, 0)2089 expect(game.isFinished()).to.equal(false)2090 game.nextTurn(2, 1)2091 expect(game.isFinished()).to.equal(false)2092 game.nextTurn(0, 2)2093 expect(game.isFinished()).to.equal(false)2094 game.nextTurn(1, 2)2095 expect(game.isFinished()).to.equal(false)2096 game.nextTurn(2, 1)2097 expect(game.isFinished()).to.equal(false)2098 game.nextTurn(1, 0)2099 expect(game.isFinished()).to.equal(false)2100 game.nextTurn(0, 0)2101 expect(game.isFinished()).to.equal(true)2102 game = new TicTacToe();2103 game.nextTurn(2, 2)2104 expect(game.isFinished()).to.equal(false)2105 game.nextTurn(1, 2)2106 expect(game.isFinished()).to.equal(false)2107 game.nextTurn(2, 1)2108 expect(game.isFinished()).to.equal(false)2109 game.nextTurn(2, 0)2110 expect(game.isFinished()).to.equal(false)2111 game.nextTurn(0, 0)2112 expect(game.isFinished()).to.equal(false)2113 game.nextTurn(2, 1)2114 expect(game.isFinished()).to.equal(false)2115 game.nextTurn(2, 1)2116 expect(game.isFinished()).to.equal(false)2117 game.nextTurn(0, 2)2118 expect(game.isFinished()).to.equal(false)2119 game.nextTurn(0, 2)2120 expect(game.isFinished()).to.equal(false)2121 game.nextTurn(2, 2)2122 expect(game.isFinished()).to.equal(false)2123 game.nextTurn(0, 0)2124 expect(game.isFinished()).to.equal(false)2125 game.nextTurn(0, 1)2126 expect(game.isFinished()).to.equal(false)2127 game.nextTurn(1, 2)2128 expect(game.isFinished()).to.equal(false)2129 game.nextTurn(0, 2)2130 expect(game.isFinished()).to.equal(false)2131 game.nextTurn(0, 2)2132 expect(game.isFinished()).to.equal(false)2133 game.nextTurn(1, 1)2134 expect(game.isFinished()).to.equal(true)2135 game = new TicTacToe();2136 game.nextTurn(0, 2)2137 expect(game.isFinished()).to.equal(false)2138 game.nextTurn(2, 0)2139 expect(game.isFinished()).to.equal(false)2140 game.nextTurn(0, 0)2141 expect(game.isFinished()).to.equal(false)2142 game.nextTurn(1, 0)2143 expect(game.isFinished()).to.equal(false)2144 game.nextTurn(0, 2)2145 expect(game.isFinished()).to.equal(false)2146 game.nextTurn(0, 2)2147 expect(game.isFinished()).to.equal(false)2148 game.nextTurn(0, 2)2149 expect(game.isFinished()).to.equal(false)2150 game.nextTurn(2, 1)2151 expect(game.isFinished()).to.equal(false)2152 game.nextTurn(1, 1)2153 expect(game.isFinished()).to.equal(false)2154 game.nextTurn(1, 1)2155 expect(game.isFinished()).to.equal(false)2156 game.nextTurn(1, 0)2157 expect(game.isFinished()).to.equal(false)2158 game.nextTurn(2, 1)2159 expect(game.isFinished()).to.equal(false)2160 game.nextTurn(2, 0)2161 expect(game.isFinished()).to.equal(false)2162 game.nextTurn(1, 0)2163 expect(game.isFinished()).to.equal(false)2164 game.nextTurn(2, 2)2165 expect(game.isFinished()).to.equal(false)2166 game.nextTurn(1, 1)2167 expect(game.isFinished()).to.equal(false)2168 game.nextTurn(2, 0)2169 expect(game.isFinished()).to.equal(false)2170 game.nextTurn(1, 0)2171 expect(game.isFinished()).to.equal(false)2172 game.nextTurn(0, 2)2173 expect(game.isFinished()).to.equal(false)2174 game.nextTurn(2, 0)2175 expect(game.isFinished()).to.equal(false)2176 game.nextTurn(1, 0)2177 expect(game.isFinished()).to.equal(false)2178 game.nextTurn(1, 0)2179 expect(game.isFinished()).to.equal(false)2180 game.nextTurn(2, 1)2181 expect(game.isFinished()).to.equal(false)2182 game.nextTurn(0, 0)2183 expect(game.isFinished()).to.equal(false)2184 game.nextTurn(0, 1)2185 expect(game.isFinished()).to.equal(false)2186 game.nextTurn(1, 1)2187 expect(game.isFinished()).to.equal(false)2188 game.nextTurn(2, 0)2189 expect(game.isFinished()).to.equal(false)2190 game.nextTurn(2, 1)2191 expect(game.isFinished()).to.equal(false)2192 game.nextTurn(1, 0)2193 expect(game.isFinished()).to.equal(false)2194 game.nextTurn(0, 0)2195 expect(game.isFinished()).to.equal(false)2196 game.nextTurn(2, 0)2197 expect(game.isFinished()).to.equal(false)2198 game.nextTurn(0, 1)2199 expect(game.isFinished()).to.equal(false)2200 game.nextTurn(0, 1)2201 expect(game.isFinished()).to.equal(false)2202 game.nextTurn(1, 2)2203 expect(game.isFinished()).to.equal(true)2204 game = new TicTacToe();2205 game.nextTurn(1, 2)2206 expect(game.isFinished()).to.equal(false)2207 game.nextTurn(0, 0)2208 expect(game.isFinished()).to.equal(false)2209 game.nextTurn(1, 1)2210 expect(game.isFinished()).to.equal(false)2211 game.nextTurn(0, 1)2212 expect(game.isFinished()).to.equal(false)2213 game.nextTurn(0, 1)2214 expect(game.isFinished()).to.equal(false)2215 game.nextTurn(2, 2)2216 expect(game.isFinished()).to.equal(false)2217 game.nextTurn(0, 0)2218 expect(game.isFinished()).to.equal(false)2219 game.nextTurn(1, 1)2220 expect(game.isFinished()).to.equal(false)2221 game.nextTurn(0, 0)2222 expect(game.isFinished()).to.equal(false)2223 game.nextTurn(2, 1)2224 expect(game.isFinished()).to.equal(false)2225 game.nextTurn(2, 0)2226 expect(game.isFinished()).to.equal(false)2227 game.nextTurn(0, 0)2228 expect(game.isFinished()).to.equal(false)2229 game.nextTurn(2, 2)2230 expect(game.isFinished()).to.equal(false)2231 game.nextTurn(0, 1)2232 expect(game.isFinished()).to.equal(false)2233 game.nextTurn(1, 0)2234 expect(game.isFinished()).to.equal(false)2235 game.nextTurn(1, 1)2236 expect(game.isFinished()).to.equal(false)2237 game.nextTurn(1, 0)2238 expect(game.isFinished()).to.equal(false)2239 game.nextTurn(2, 0)2240 expect(game.isFinished()).to.equal(false)2241 game.nextTurn(0, 2)2242 expect(game.isFinished()).to.equal(true)2243 game = new TicTacToe();2244 game.nextTurn(1, 2)2245 expect(game.isFinished()).to.equal(false)2246 game.nextTurn(1, 1)2247 expect(game.isFinished()).to.equal(false)2248 game.nextTurn(0, 1)2249 expect(game.isFinished()).to.equal(false)2250 game.nextTurn(2, 1)2251 expect(game.isFinished()).to.equal(false)2252 game.nextTurn(1, 2)2253 expect(game.isFinished()).to.equal(false)2254 game.nextTurn(2, 2)2255 expect(game.isFinished()).to.equal(false)2256 game.nextTurn(1, 1)2257 expect(game.isFinished()).to.equal(false)2258 game.nextTurn(1, 2)2259 expect(game.isFinished()).to.equal(false)2260 game.nextTurn(1, 1)2261 expect(game.isFinished()).to.equal(false)2262 game.nextTurn(0, 1)2263 expect(game.isFinished()).to.equal(false)2264 game.nextTurn(1, 0)2265 expect(game.isFinished()).to.equal(false)2266 game.nextTurn(2, 2)2267 expect(game.isFinished()).to.equal(false)2268 game.nextTurn(2, 0)2269 expect(game.isFinished()).to.equal(false)2270 game.nextTurn(2, 0)2271 expect(game.isFinished()).to.equal(false)2272 game.nextTurn(2, 2)2273 expect(game.isFinished()).to.equal(false)2274 game.nextTurn(2, 1)2275 expect(game.isFinished()).to.equal(false)2276 game.nextTurn(2, 1)2277 expect(game.isFinished()).to.equal(false)2278 game.nextTurn(1, 1)2279 expect(game.isFinished()).to.equal(false)2280 game.nextTurn(2, 2)2281 expect(game.isFinished()).to.equal(false)2282 game.nextTurn(1, 0)2283 expect(game.isFinished()).to.equal(false)2284 game.nextTurn(2, 0)2285 expect(game.isFinished()).to.equal(false)2286 game.nextTurn(2, 2)2287 expect(game.isFinished()).to.equal(false)2288 game.nextTurn(2, 1)2289 expect(game.isFinished()).to.equal(false)2290 game.nextTurn(2, 2)2291 expect(game.isFinished()).to.equal(false)2292 game.nextTurn(1, 1)2293 expect(game.isFinished()).to.equal(false)2294 game.nextTurn(1, 0)2295 expect(game.isFinished()).to.equal(false)2296 game.nextTurn(1, 0)2297 expect(game.isFinished()).to.equal(false)2298 game.nextTurn(2, 2)2299 expect(game.isFinished()).to.equal(false)2300 game.nextTurn(0, 0)2301 expect(game.isFinished()).to.equal(false)2302 game.nextTurn(2, 2)2303 expect(game.isFinished()).to.equal(false)2304 game.nextTurn(2, 0)2305 expect(game.isFinished()).to.equal(false)2306 game.nextTurn(2, 0)2307 expect(game.isFinished()).to.equal(false)2308 game.nextTurn(0, 0)2309 expect(game.isFinished()).to.equal(false)2310 game.nextTurn(0, 2)2311 expect(game.isFinished()).to.equal(true)2312 });2313 });2314 describe('#nextTurn', () => {2315 it('should update game state correctly', () => {2316 let game;2317 game = new TicTacToe();2318 game.nextTurn(2, 1)2319 expect(game.isFinished()).to.equal(false)2320 expect(game.getWinner()).to.equal(null)2321 expect(game.noMoreTurns()).to.equal(false);2322 expect(game.isDraw()).to.equal(false);2323 expect(game.getFieldValue(2, 1)).to.equal('x')2324 expect(game.getCurrentPlayerSymbol()).to.equal('o')2325 game.nextTurn(2, 1)2326 expect(game.isFinished()).to.equal(false)2327 expect(game.getWinner()).to.equal(null)2328 expect(game.noMoreTurns()).to.equal(false);2329 expect(game.isDraw()).to.equal(false);2330 expect(game.getFieldValue(2, 1)).to.equal('x')2331 expect(game.getCurrentPlayerSymbol()).to.equal('o')2332 game.nextTurn(2, 2)2333 expect(game.isFinished()).to.equal(false)2334 expect(game.getWinner()).to.equal(null)2335 expect(game.noMoreTurns()).to.equal(false);2336 expect(game.isDraw()).to.equal(false);2337 expect(game.getFieldValue(2, 2)).to.equal('o')2338 expect(game.getCurrentPlayerSymbol()).to.equal('x')2339 game.nextTurn(2, 1)2340 expect(game.isFinished()).to.equal(false)2341 expect(game.getWinner()).to.equal(null)2342 expect(game.noMoreTurns()).to.equal(false);2343 expect(game.isDraw()).to.equal(false);2344 expect(game.getFieldValue(2, 1)).to.equal('x')2345 expect(game.getCurrentPlayerSymbol()).to.equal('x')2346 game.nextTurn(0, 2)2347 expect(game.isFinished()).to.equal(false)2348 expect(game.getWinner()).to.equal(null)2349 expect(game.noMoreTurns()).to.equal(false);2350 expect(game.isDraw()).to.equal(false);2351 expect(game.getFieldValue(0, 2)).to.equal('x')2352 expect(game.getCurrentPlayerSymbol()).to.equal('o')2353 game.nextTurn(1, 1)2354 expect(game.isFinished()).to.equal(false)2355 expect(game.getWinner()).to.equal(null)2356 expect(game.noMoreTurns()).to.equal(false);2357 expect(game.isDraw()).to.equal(false);2358 expect(game.getFieldValue(1, 1)).to.equal('o')2359 expect(game.getCurrentPlayerSymbol()).to.equal('x')2360 game.nextTurn(2, 1)2361 expect(game.isFinished()).to.equal(false)2362 expect(game.getWinner()).to.equal(null)2363 expect(game.noMoreTurns()).to.equal(false);2364 expect(game.isDraw()).to.equal(false);2365 expect(game.getFieldValue(2, 1)).to.equal('x')2366 expect(game.getCurrentPlayerSymbol()).to.equal('x')2367 game.nextTurn(2, 1)2368 expect(game.isFinished()).to.equal(false)2369 expect(game.getWinner()).to.equal(null)2370 expect(game.noMoreTurns()).to.equal(false);2371 expect(game.isDraw()).to.equal(false);2372 expect(game.getFieldValue(2, 1)).to.equal('x')2373 expect(game.getCurrentPlayerSymbol()).to.equal('x')2374 game.nextTurn(1, 0)2375 expect(game.isFinished()).to.equal(false)2376 expect(game.getWinner()).to.equal(null)2377 expect(game.noMoreTurns()).to.equal(false);2378 expect(game.isDraw()).to.equal(false);2379 expect(game.getFieldValue(1, 0)).to.equal('x')2380 expect(game.getCurrentPlayerSymbol()).to.equal('o')2381 game.nextTurn(1, 1)2382 expect(game.isFinished()).to.equal(false)2383 expect(game.getWinner()).to.equal(null)2384 expect(game.noMoreTurns()).to.equal(false);2385 expect(game.isDraw()).to.equal(false);2386 expect(game.getFieldValue(1, 1)).to.equal('o')2387 expect(game.getCurrentPlayerSymbol()).to.equal('o')2388 game.nextTurn(1, 1)2389 expect(game.isFinished()).to.equal(false)2390 expect(game.getWinner()).to.equal(null)2391 expect(game.noMoreTurns()).to.equal(false);2392 expect(game.isDraw()).to.equal(false);2393 expect(game.getFieldValue(1, 1)).to.equal('o')2394 expect(game.getCurrentPlayerSymbol()).to.equal('o')2395 game.nextTurn(2, 1)2396 expect(game.isFinished()).to.equal(false)2397 expect(game.getWinner()).to.equal(null)2398 expect(game.noMoreTurns()).to.equal(false);2399 expect(game.isDraw()).to.equal(false);2400 expect(game.getFieldValue(2, 1)).to.equal('x')2401 expect(game.getCurrentPlayerSymbol()).to.equal('o')2402 game.nextTurn(1, 2)2403 expect(game.isFinished()).to.equal(false)2404 expect(game.getWinner()).to.equal(null)2405 expect(game.noMoreTurns()).to.equal(false);2406 expect(game.isDraw()).to.equal(false);2407 expect(game.getFieldValue(1, 2)).to.equal('o')2408 expect(game.getCurrentPlayerSymbol()).to.equal('x')2409 game.nextTurn(0, 1)2410 expect(game.isFinished()).to.equal(false)2411 expect(game.getWinner()).to.equal(null)2412 expect(game.noMoreTurns()).to.equal(false);2413 expect(game.isDraw()).to.equal(false);2414 expect(game.getFieldValue(0, 1)).to.equal('x')2415 expect(game.getCurrentPlayerSymbol()).to.equal('o')2416 game.nextTurn(0, 2)2417 expect(game.isFinished()).to.equal(false)2418 expect(game.getWinner()).to.equal(null)2419 expect(game.noMoreTurns()).to.equal(false);2420 expect(game.isDraw()).to.equal(false);2421 expect(game.getFieldValue(0, 2)).to.equal('x')2422 expect(game.getCurrentPlayerSymbol()).to.equal('o')2423 game.nextTurn(0, 0)2424 expect(game.isFinished()).to.equal(true)2425 expect(game.getWinner()).to.equal('o')2426 expect(game.noMoreTurns()).to.equal(false);2427 expect(game.isDraw()).to.equal(false);2428 expect(game.getFieldValue(0, 0)).to.equal('o')2429 expect(game.getCurrentPlayerSymbol()).to.equal('x')2430 game = new TicTacToe();2431 game.nextTurn(2, 2)2432 expect(game.isFinished()).to.equal(false)2433 expect(game.getWinner()).to.equal(null)2434 expect(game.noMoreTurns()).to.equal(false);2435 expect(game.isDraw()).to.equal(false);2436 expect(game.getFieldValue(2, 2)).to.equal('x')2437 expect(game.getCurrentPlayerSymbol()).to.equal('o')2438 game.nextTurn(1, 0)2439 expect(game.isFinished()).to.equal(false)2440 expect(game.getWinner()).to.equal(null)2441 expect(game.noMoreTurns()).to.equal(false);2442 expect(game.isDraw()).to.equal(false);2443 expect(game.getFieldValue(1, 0)).to.equal('o')2444 expect(game.getCurrentPlayerSymbol()).to.equal('x')2445 game.nextTurn(1, 1)2446 expect(game.isFinished()).to.equal(false)2447 expect(game.getWinner()).to.equal(null)2448 expect(game.noMoreTurns()).to.equal(false);2449 expect(game.isDraw()).to.equal(false);2450 expect(game.getFieldValue(1, 1)).to.equal('x')2451 expect(game.getCurrentPlayerSymbol()).to.equal('o')2452 game.nextTurn(0, 0)2453 expect(game.isFinished()).to.equal(false)2454 expect(game.getWinner()).to.equal(null)2455 expect(game.noMoreTurns()).to.equal(false);2456 expect(game.isDraw()).to.equal(false);2457 expect(game.getFieldValue(0, 0)).to.equal('o')2458 expect(game.getCurrentPlayerSymbol()).to.equal('x')2459 game.nextTurn(1, 0)2460 expect(game.isFinished()).to.equal(false)2461 expect(game.getWinner()).to.equal(null)2462 expect(game.noMoreTurns()).to.equal(false);2463 expect(game.isDraw()).to.equal(false);2464 expect(game.getFieldValue(1, 0)).to.equal('o')2465 expect(game.getCurrentPlayerSymbol()).to.equal('x')2466 game.nextTurn(2, 0)2467 expect(game.isFinished()).to.equal(false)2468 expect(game.getWinner()).to.equal(null)2469 expect(game.noMoreTurns()).to.equal(false);2470 expect(game.isDraw()).to.equal(false);2471 expect(game.getFieldValue(2, 0)).to.equal('x')2472 expect(game.getCurrentPlayerSymbol()).to.equal('o')2473 game.nextTurn(1, 1)2474 expect(game.isFinished()).to.equal(false)2475 expect(game.getWinner()).to.equal(null)2476 expect(game.noMoreTurns()).to.equal(false);2477 expect(game.isDraw()).to.equal(false);2478 expect(game.getFieldValue(1, 1)).to.equal('x')2479 expect(game.getCurrentPlayerSymbol()).to.equal('o')2480 game.nextTurn(0, 2)2481 expect(game.isFinished()).to.equal(false)2482 expect(game.getWinner()).to.equal(null)2483 expect(game.noMoreTurns()).to.equal(false);2484 expect(game.isDraw()).to.equal(false);2485 expect(game.getFieldValue(0, 2)).to.equal('o')2486 expect(game.getCurrentPlayerSymbol()).to.equal('x')2487 game.nextTurn(2, 0)2488 expect(game.isFinished()).to.equal(false)2489 expect(game.getWinner()).to.equal(null)2490 expect(game.noMoreTurns()).to.equal(false);2491 expect(game.isDraw()).to.equal(false);2492 expect(game.getFieldValue(2, 0)).to.equal('x')2493 expect(game.getCurrentPlayerSymbol()).to.equal('x')2494 game.nextTurn(0, 2)2495 expect(game.isFinished()).to.equal(false)2496 expect(game.getWinner()).to.equal(null)2497 expect(game.noMoreTurns()).to.equal(false);2498 expect(game.isDraw()).to.equal(false);2499 expect(game.getFieldValue(0, 2)).to.equal('o')2500 expect(game.getCurrentPlayerSymbol()).to.equal('x')2501 game.nextTurn(2, 0)2502 expect(game.isFinished()).to.equal(false)2503 expect(game.getWinner()).to.equal(null)2504 expect(game.noMoreTurns()).to.equal(false);2505 expect(game.isDraw()).to.equal(false);2506 expect(game.getFieldValue(2, 0)).to.equal('x')2507 expect(game.getCurrentPlayerSymbol()).to.equal('x')2508 game.nextTurn(1, 0)2509 expect(game.isFinished()).to.equal(false)2510 expect(game.getWinner()).to.equal(null)2511 expect(game.noMoreTurns()).to.equal(false);2512 expect(game.isDraw()).to.equal(false);2513 expect(game.getFieldValue(1, 0)).to.equal('o')2514 expect(game.getCurrentPlayerSymbol()).to.equal('x')2515 game.nextTurn(2, 1)2516 expect(game.isFinished()).to.equal(true)2517 expect(game.getWinner()).to.equal('x')2518 expect(game.noMoreTurns()).to.equal(false);2519 expect(game.isDraw()).to.equal(false);2520 expect(game.getFieldValue(2, 1)).to.equal('x')2521 expect(game.getCurrentPlayerSymbol()).to.equal('o')2522 game = new TicTacToe();2523 game.nextTurn(0, 0)2524 expect(game.isFinished()).to.equal(false)2525 expect(game.getWinner()).to.equal(null)2526 expect(game.noMoreTurns()).to.equal(false);2527 expect(game.isDraw()).to.equal(false);2528 expect(game.getFieldValue(0, 0)).to.equal('x')2529 expect(game.getCurrentPlayerSymbol()).to.equal('o')2530 game.nextTurn(0, 1)2531 expect(game.isFinished()).to.equal(false)2532 expect(game.getWinner()).to.equal(null)2533 expect(game.noMoreTurns()).to.equal(false);2534 expect(game.isDraw()).to.equal(false);2535 expect(game.getFieldValue(0, 1)).to.equal('o')2536 expect(game.getCurrentPlayerSymbol()).to.equal('x')2537 game.nextTurn(2, 1)2538 expect(game.isFinished()).to.equal(false)2539 expect(game.getWinner()).to.equal(null)2540 expect(game.noMoreTurns()).to.equal(false);2541 expect(game.isDraw()).to.equal(false);2542 expect(game.getFieldValue(2, 1)).to.equal('x')2543 expect(game.getCurrentPlayerSymbol()).to.equal('o')2544 game.nextTurn(2, 2)2545 expect(game.isFinished()).to.equal(false)2546 expect(game.getWinner()).to.equal(null)2547 expect(game.noMoreTurns()).to.equal(false);2548 expect(game.isDraw()).to.equal(false);2549 expect(game.getFieldValue(2, 2)).to.equal('o')2550 expect(game.getCurrentPlayerSymbol()).to.equal('x')2551 game.nextTurn(2, 0)2552 expect(game.isFinished()).to.equal(false)2553 expect(game.getWinner()).to.equal(null)2554 expect(game.noMoreTurns()).to.equal(false);2555 expect(game.isDraw()).to.equal(false);2556 expect(game.getFieldValue(2, 0)).to.equal('x')2557 expect(game.getCurrentPlayerSymbol()).to.equal('o')2558 game.nextTurn(1, 1)2559 expect(game.isFinished()).to.equal(false)2560 expect(game.getWinner()).to.equal(null)2561 expect(game.noMoreTurns()).to.equal(false);2562 expect(game.isDraw()).to.equal(false);2563 expect(game.getFieldValue(1, 1)).to.equal('o')2564 expect(game.getCurrentPlayerSymbol()).to.equal('x')2565 game.nextTurn(0, 2)2566 expect(game.isFinished()).to.equal(false)2567 expect(game.getWinner()).to.equal(null)2568 expect(game.noMoreTurns()).to.equal(false);2569 expect(game.isDraw()).to.equal(false);2570 expect(game.getFieldValue(0, 2)).to.equal('x')2571 expect(game.getCurrentPlayerSymbol()).to.equal('o')2572 game.nextTurn(2, 2)2573 expect(game.isFinished()).to.equal(false)2574 expect(game.getWinner()).to.equal(null)2575 expect(game.noMoreTurns()).to.equal(false);2576 expect(game.isDraw()).to.equal(false);2577 expect(game.getFieldValue(2, 2)).to.equal('o')2578 expect(game.getCurrentPlayerSymbol()).to.equal('o')2579 game.nextTurn(1, 2)2580 expect(game.isFinished()).to.equal(false)2581 expect(game.getWinner()).to.equal(null)2582 expect(game.noMoreTurns()).to.equal(false);2583 expect(game.isDraw()).to.equal(false);2584 expect(game.getFieldValue(1, 2)).to.equal('o')2585 expect(game.getCurrentPlayerSymbol()).to.equal('x')2586 game.nextTurn(1, 0)2587 expect(game.isFinished()).to.equal(true)2588 expect(game.getWinner()).to.equal('x')2589 expect(game.noMoreTurns()).to.equal(true);2590 expect(game.isDraw()).to.equal(false);2591 expect(game.getFieldValue(1, 0)).to.equal('x')2592 expect(game.getCurrentPlayerSymbol()).to.equal('o')2593 game = new TicTacToe();2594 game.nextTurn(2, 2)2595 expect(game.isFinished()).to.equal(false)2596 expect(game.getWinner()).to.equal(null)2597 expect(game.noMoreTurns()).to.equal(false);2598 expect(game.isDraw()).to.equal(false);2599 expect(game.getFieldValue(2, 2)).to.equal('x')2600 expect(game.getCurrentPlayerSymbol()).to.equal('o')2601 game.nextTurn(2, 1)2602 expect(game.isFinished()).to.equal(false)2603 expect(game.getWinner()).to.equal(null)2604 expect(game.noMoreTurns()).to.equal(false);2605 expect(game.isDraw()).to.equal(false);2606 expect(game.getFieldValue(2, 1)).to.equal('o')2607 expect(game.getCurrentPlayerSymbol()).to.equal('x')2608 game.nextTurn(2, 0)2609 expect(game.isFinished()).to.equal(false)2610 expect(game.getWinner()).to.equal(null)2611 expect(game.noMoreTurns()).to.equal(false);2612 expect(game.isDraw()).to.equal(false);2613 expect(game.getFieldValue(2, 0)).to.equal('x')2614 expect(game.getCurrentPlayerSymbol()).to.equal('o')2615 game.nextTurn(0, 2)2616 expect(game.isFinished()).to.equal(false)2617 expect(game.getWinner()).to.equal(null)2618 expect(game.noMoreTurns()).to.equal(false);2619 expect(game.isDraw()).to.equal(false);2620 expect(game.getFieldValue(0, 2)).to.equal('o')2621 expect(game.getCurrentPlayerSymbol()).to.equal('x')2622 game.nextTurn(0, 0)2623 expect(game.isFinished()).to.equal(false)2624 expect(game.getWinner()).to.equal(null)2625 expect(game.noMoreTurns()).to.equal(false);2626 expect(game.isDraw()).to.equal(false);2627 expect(game.getFieldValue(0, 0)).to.equal('x')2628 expect(game.getCurrentPlayerSymbol()).to.equal('o')2629 game.nextTurn(2, 0)2630 expect(game.isFinished()).to.equal(false)2631 expect(game.getWinner()).to.equal(null)2632 expect(game.noMoreTurns()).to.equal(false);2633 expect(game.isDraw()).to.equal(false);2634 expect(game.getFieldValue(2, 0)).to.equal('x')2635 expect(game.getCurrentPlayerSymbol()).to.equal('o')2636 game.nextTurn(0, 2)2637 expect(game.isFinished()).to.equal(false)2638 expect(game.getWinner()).to.equal(null)2639 expect(game.noMoreTurns()).to.equal(false);2640 expect(game.isDraw()).to.equal(false);2641 expect(game.getFieldValue(0, 2)).to.equal('o')2642 expect(game.getCurrentPlayerSymbol()).to.equal('o')2643 game.nextTurn(2, 0)2644 expect(game.isFinished()).to.equal(false)2645 expect(game.getWinner()).to.equal(null)2646 expect(game.noMoreTurns()).to.equal(false);2647 expect(game.isDraw()).to.equal(false);2648 expect(game.getFieldValue(2, 0)).to.equal('x')2649 expect(game.getCurrentPlayerSymbol()).to.equal('o')2650 game.nextTurn(2, 0)2651 expect(game.isFinished()).to.equal(false)2652 expect(game.getWinner()).to.equal(null)2653 expect(game.noMoreTurns()).to.equal(false);2654 expect(game.isDraw()).to.equal(false);2655 expect(game.getFieldValue(2, 0)).to.equal('x')2656 expect(game.getCurrentPlayerSymbol()).to.equal('o')2657 game.nextTurn(0, 0)2658 expect(game.isFinished()).to.equal(false)2659 expect(game.getWinner()).to.equal(null)2660 expect(game.noMoreTurns()).to.equal(false);2661 expect(game.isDraw()).to.equal(false);2662 expect(game.getFieldValue(0, 0)).to.equal('x')2663 expect(game.getCurrentPlayerSymbol()).to.equal('o')2664 game.nextTurn(2, 2)2665 expect(game.isFinished()).to.equal(false)2666 expect(game.getWinner()).to.equal(null)2667 expect(game.noMoreTurns()).to.equal(false);2668 expect(game.isDraw()).to.equal(false);2669 expect(game.getFieldValue(2, 2)).to.equal('x')2670 expect(game.getCurrentPlayerSymbol()).to.equal('o')2671 game.nextTurn(1, 1)2672 expect(game.isFinished()).to.equal(false)2673 expect(game.getWinner()).to.equal(null)2674 expect(game.noMoreTurns()).to.equal(false);2675 expect(game.isDraw()).to.equal(false);2676 expect(game.getFieldValue(1, 1)).to.equal('o')2677 expect(game.getCurrentPlayerSymbol()).to.equal('x')2678 game.nextTurn(2, 2)2679 expect(game.isFinished()).to.equal(false)2680 expect(game.getWinner()).to.equal(null)2681 expect(game.noMoreTurns()).to.equal(false);2682 expect(game.isDraw()).to.equal(false);2683 expect(game.getFieldValue(2, 2)).to.equal('x')2684 expect(game.getCurrentPlayerSymbol()).to.equal('x')2685 game.nextTurn(2, 2)2686 expect(game.isFinished()).to.equal(false)2687 expect(game.getWinner()).to.equal(null)2688 expect(game.noMoreTurns()).to.equal(false);2689 expect(game.isDraw()).to.equal(false);2690 expect(game.getFieldValue(2, 2)).to.equal('x')2691 expect(game.getCurrentPlayerSymbol()).to.equal('x')2692 game.nextTurn(1, 0)2693 expect(game.isFinished()).to.equal(true)2694 expect(game.getWinner()).to.equal('x')2695 expect(game.noMoreTurns()).to.equal(false);2696 expect(game.isDraw()).to.equal(false);2697 expect(game.getFieldValue(1, 0)).to.equal('x')2698 expect(game.getCurrentPlayerSymbol()).to.equal('o')2699 game = new TicTacToe();2700 game.nextTurn(2, 1)2701 expect(game.isFinished()).to.equal(false)2702 expect(game.getWinner()).to.equal(null)2703 expect(game.noMoreTurns()).to.equal(false);2704 expect(game.isDraw()).to.equal(false);2705 expect(game.getFieldValue(2, 1)).to.equal('x')2706 expect(game.getCurrentPlayerSymbol()).to.equal('o')2707 game.nextTurn(2, 1)2708 expect(game.isFinished()).to.equal(false)2709 expect(game.getWinner()).to.equal(null)2710 expect(game.noMoreTurns()).to.equal(false);2711 expect(game.isDraw()).to.equal(false);2712 expect(game.getFieldValue(2, 1)).to.equal('x')2713 expect(game.getCurrentPlayerSymbol()).to.equal('o')2714 game.nextTurn(0, 0)2715 expect(game.isFinished()).to.equal(false)2716 expect(game.getWinner()).to.equal(null)2717 expect(game.noMoreTurns()).to.equal(false);2718 expect(game.isDraw()).to.equal(false);2719 expect(game.getFieldValue(0, 0)).to.equal('o')2720 expect(game.getCurrentPlayerSymbol()).to.equal('x')2721 game.nextTurn(2, 0)2722 expect(game.isFinished()).to.equal(false)2723 expect(game.getWinner()).to.equal(null)2724 expect(game.noMoreTurns()).to.equal(false);2725 expect(game.isDraw()).to.equal(false);2726 expect(game.getFieldValue(2, 0)).to.equal('x')2727 expect(game.getCurrentPlayerSymbol()).to.equal('o')2728 game.nextTurn(0, 0)2729 expect(game.isFinished()).to.equal(false)2730 expect(game.getWinner()).to.equal(null)2731 expect(game.noMoreTurns()).to.equal(false);2732 expect(game.isDraw()).to.equal(false);2733 expect(game.getFieldValue(0, 0)).to.equal('o')2734 expect(game.getCurrentPlayerSymbol()).to.equal('o')2735 game.nextTurn(0, 0)2736 expect(game.isFinished()).to.equal(false)2737 expect(game.getWinner()).to.equal(null)2738 expect(game.noMoreTurns()).to.equal(false);2739 expect(game.isDraw()).to.equal(false);2740 expect(game.getFieldValue(0, 0)).to.equal('o')2741 expect(game.getCurrentPlayerSymbol()).to.equal('o')2742 game.nextTurn(2, 2)2743 expect(game.isFinished()).to.equal(false)2744 expect(game.getWinner()).to.equal(null)2745 expect(game.noMoreTurns()).to.equal(false);2746 expect(game.isDraw()).to.equal(false);2747 expect(game.getFieldValue(2, 2)).to.equal('o')2748 expect(game.getCurrentPlayerSymbol()).to.equal('x')2749 game.nextTurn(2, 2)2750 expect(game.isFinished()).to.equal(false)2751 expect(game.getWinner()).to.equal(null)2752 expect(game.noMoreTurns()).to.equal(false);2753 expect(game.isDraw()).to.equal(false);2754 expect(game.getFieldValue(2, 2)).to.equal('o')2755 expect(game.getCurrentPlayerSymbol()).to.equal('x')2756 game.nextTurn(2, 2)2757 expect(game.isFinished()).to.equal(false)2758 expect(game.getWinner()).to.equal(null)2759 expect(game.noMoreTurns()).to.equal(false);2760 expect(game.isDraw()).to.equal(false);2761 expect(game.getFieldValue(2, 2)).to.equal('o')2762 expect(game.getCurrentPlayerSymbol()).to.equal('x')2763 game.nextTurn(1, 1)2764 expect(game.isFinished()).to.equal(false)2765 expect(game.getWinner()).to.equal(null)2766 expect(game.noMoreTurns()).to.equal(false);2767 expect(game.isDraw()).to.equal(false);2768 expect(game.getFieldValue(1, 1)).to.equal('x')2769 expect(game.getCurrentPlayerSymbol()).to.equal('o')2770 game.nextTurn(1, 0)2771 expect(game.isFinished()).to.equal(false)2772 expect(game.getWinner()).to.equal(null)2773 expect(game.noMoreTurns()).to.equal(false);2774 expect(game.isDraw()).to.equal(false);2775 expect(game.getFieldValue(1, 0)).to.equal('o')2776 expect(game.getCurrentPlayerSymbol()).to.equal('x')2777 game.nextTurn(1, 0)2778 expect(game.isFinished()).to.equal(false)2779 expect(game.getWinner()).to.equal(null)2780 expect(game.noMoreTurns()).to.equal(false);2781 expect(game.isDraw()).to.equal(false);2782 expect(game.getFieldValue(1, 0)).to.equal('o')2783 expect(game.getCurrentPlayerSymbol()).to.equal('x')2784 game.nextTurn(1, 0)2785 expect(game.isFinished()).to.equal(false)2786 expect(game.getWinner()).to.equal(null)2787 expect(game.noMoreTurns()).to.equal(false);2788 expect(game.isDraw()).to.equal(false);2789 expect(game.getFieldValue(1, 0)).to.equal('o')2790 expect(game.getCurrentPlayerSymbol()).to.equal('x')2791 game.nextTurn(1, 2)2792 expect(game.isFinished()).to.equal(false)2793 expect(game.getWinner()).to.equal(null)2794 expect(game.noMoreTurns()).to.equal(false);2795 expect(game.isDraw()).to.equal(false);2796 expect(game.getFieldValue(1, 2)).to.equal('x')2797 expect(game.getCurrentPlayerSymbol()).to.equal('o')2798 game.nextTurn(2, 0)2799 expect(game.isFinished()).to.equal(false)2800 expect(game.getWinner()).to.equal(null)2801 expect(game.noMoreTurns()).to.equal(false);2802 expect(game.isDraw()).to.equal(false);2803 expect(game.getFieldValue(2, 0)).to.equal('x')2804 expect(game.getCurrentPlayerSymbol()).to.equal('o')2805 game.nextTurn(0, 1)2806 expect(game.isFinished()).to.equal(false)2807 expect(game.getWinner()).to.equal(null)2808 expect(game.noMoreTurns()).to.equal(false);2809 expect(game.isDraw()).to.equal(false);2810 expect(game.getFieldValue(0, 1)).to.equal('o')2811 expect(game.getCurrentPlayerSymbol()).to.equal('x')2812 game.nextTurn(2, 2)2813 expect(game.isFinished()).to.equal(false)2814 expect(game.getWinner()).to.equal(null)2815 expect(game.noMoreTurns()).to.equal(false);2816 expect(game.isDraw()).to.equal(false);2817 expect(game.getFieldValue(2, 2)).to.equal('o')2818 expect(game.getCurrentPlayerSymbol()).to.equal('x')2819 game.nextTurn(1, 1)2820 expect(game.isFinished()).to.equal(false)2821 expect(game.getWinner()).to.equal(null)2822 expect(game.noMoreTurns()).to.equal(false);2823 expect(game.isDraw()).to.equal(false);2824 expect(game.getFieldValue(1, 1)).to.equal('x')2825 expect(game.getCurrentPlayerSymbol()).to.equal('x')2826 game.nextTurn(1, 0)2827 expect(game.isFinished()).to.equal(false)2828 expect(game.getWinner()).to.equal(null)2829 expect(game.noMoreTurns()).to.equal(false);2830 expect(game.isDraw()).to.equal(false);2831 expect(game.getFieldValue(1, 0)).to.equal('o')2832 expect(game.getCurrentPlayerSymbol()).to.equal('x')2833 game.nextTurn(0, 0)2834 expect(game.isFinished()).to.equal(false)2835 expect(game.getWinner()).to.equal(null)2836 expect(game.noMoreTurns()).to.equal(false);2837 expect(game.isDraw()).to.equal(false);2838 expect(game.getFieldValue(0, 0)).to.equal('o')2839 expect(game.getCurrentPlayerSymbol()).to.equal('x')2840 game.nextTurn(1, 2)2841 expect(game.isFinished()).to.equal(false)2842 expect(game.getWinner()).to.equal(null)2843 expect(game.noMoreTurns()).to.equal(false);2844 expect(game.isDraw()).to.equal(false);2845 expect(game.getFieldValue(1, 2)).to.equal('x')2846 expect(game.getCurrentPlayerSymbol()).to.equal('x')2847 game.nextTurn(0, 0)2848 expect(game.isFinished()).to.equal(false)2849 expect(game.getWinner()).to.equal(null)2850 expect(game.noMoreTurns()).to.equal(false);2851 expect(game.isDraw()).to.equal(false);2852 expect(game.getFieldValue(0, 0)).to.equal('o')2853 expect(game.getCurrentPlayerSymbol()).to.equal('x')2854 game.nextTurn(2, 2)2855 expect(game.isFinished()).to.equal(false)2856 expect(game.getWinner()).to.equal(null)2857 expect(game.noMoreTurns()).to.equal(false);2858 expect(game.isDraw()).to.equal(false);2859 expect(game.getFieldValue(2, 2)).to.equal('o')2860 expect(game.getCurrentPlayerSymbol()).to.equal('x')2861 game.nextTurn(0, 1)2862 expect(game.isFinished()).to.equal(false)2863 expect(game.getWinner()).to.equal(null)2864 expect(game.noMoreTurns()).to.equal(false);2865 expect(game.isDraw()).to.equal(false);2866 expect(game.getFieldValue(0, 1)).to.equal('o')2867 expect(game.getCurrentPlayerSymbol()).to.equal('x')2868 game.nextTurn(0, 2)2869 expect(game.isFinished()).to.equal(true)2870 expect(game.getWinner()).to.equal('x')2871 expect(game.noMoreTurns()).to.equal(true);2872 expect(game.isDraw()).to.equal(false);2873 expect(game.getFieldValue(0, 2)).to.equal('x')2874 expect(game.getCurrentPlayerSymbol()).to.equal('o')2875 game = new TicTacToe();2876 game.nextTurn(1, 1)2877 expect(game.isFinished()).to.equal(false)2878 expect(game.getWinner()).to.equal(null)2879 expect(game.noMoreTurns()).to.equal(false);2880 expect(game.isDraw()).to.equal(false);2881 expect(game.getFieldValue(1, 1)).to.equal('x')2882 expect(game.getCurrentPlayerSymbol()).to.equal('o')2883 game.nextTurn(0, 0)2884 expect(game.isFinished()).to.equal(false)2885 expect(game.getWinner()).to.equal(null)2886 expect(game.noMoreTurns()).to.equal(false);2887 expect(game.isDraw()).to.equal(false);2888 expect(game.getFieldValue(0, 0)).to.equal('o')2889 expect(game.getCurrentPlayerSymbol()).to.equal('x')2890 game.nextTurn(0, 0)2891 expect(game.isFinished()).to.equal(false)2892 expect(game.getWinner()).to.equal(null)2893 expect(game.noMoreTurns()).to.equal(false);2894 expect(game.isDraw()).to.equal(false);2895 expect(game.getFieldValue(0, 0)).to.equal('o')2896 expect(game.getCurrentPlayerSymbol()).to.equal('x')2897 game.nextTurn(0, 0)2898 expect(game.isFinished()).to.equal(false)2899 expect(game.getWinner()).to.equal(null)2900 expect(game.noMoreTurns()).to.equal(false);2901 expect(game.isDraw()).to.equal(false);2902 expect(game.getFieldValue(0, 0)).to.equal('o')2903 expect(game.getCurrentPlayerSymbol()).to.equal('x')2904 game.nextTurn(0, 0)2905 expect(game.isFinished()).to.equal(false)2906 expect(game.getWinner()).to.equal(null)2907 expect(game.noMoreTurns()).to.equal(false);2908 expect(game.isDraw()).to.equal(false);2909 expect(game.getFieldValue(0, 0)).to.equal('o')2910 expect(game.getCurrentPlayerSymbol()).to.equal('x')2911 game.nextTurn(0, 0)2912 expect(game.isFinished()).to.equal(false)2913 expect(game.getWinner()).to.equal(null)2914 expect(game.noMoreTurns()).to.equal(false);2915 expect(game.isDraw()).to.equal(false);2916 expect(game.getFieldValue(0, 0)).to.equal('o')2917 expect(game.getCurrentPlayerSymbol()).to.equal('x')2918 game.nextTurn(2, 1)2919 expect(game.isFinished()).to.equal(false)2920 expect(game.getWinner()).to.equal(null)2921 expect(game.noMoreTurns()).to.equal(false);2922 expect(game.isDraw()).to.equal(false);2923 expect(game.getFieldValue(2, 1)).to.equal('x')2924 expect(game.getCurrentPlayerSymbol()).to.equal('o')2925 game.nextTurn(0, 0)2926 expect(game.isFinished()).to.equal(false)2927 expect(game.getWinner()).to.equal(null)2928 expect(game.noMoreTurns()).to.equal(false);2929 expect(game.isDraw()).to.equal(false);2930 expect(game.getFieldValue(0, 0)).to.equal('o')2931 expect(game.getCurrentPlayerSymbol()).to.equal('o')2932 game.nextTurn(0, 0)2933 expect(game.isFinished()).to.equal(false)2934 expect(game.getWinner()).to.equal(null)2935 expect(game.noMoreTurns()).to.equal(false);2936 expect(game.isDraw()).to.equal(false);2937 expect(game.getFieldValue(0, 0)).to.equal('o')2938 expect(game.getCurrentPlayerSymbol()).to.equal('o')2939 game.nextTurn(1, 0)2940 expect(game.isFinished()).to.equal(false)2941 expect(game.getWinner()).to.equal(null)2942 expect(game.noMoreTurns()).to.equal(false);2943 expect(game.isDraw()).to.equal(false);2944 expect(game.getFieldValue(1, 0)).to.equal('o')2945 expect(game.getCurrentPlayerSymbol()).to.equal('x')2946 game.nextTurn(1, 2)2947 expect(game.isFinished()).to.equal(false)2948 expect(game.getWinner()).to.equal(null)2949 expect(game.noMoreTurns()).to.equal(false);2950 expect(game.isDraw()).to.equal(false);2951 expect(game.getFieldValue(1, 2)).to.equal('x')2952 expect(game.getCurrentPlayerSymbol()).to.equal('o')2953 game.nextTurn(1, 1)2954 expect(game.isFinished()).to.equal(false)2955 expect(game.getWinner()).to.equal(null)2956 expect(game.noMoreTurns()).to.equal(false);2957 expect(game.isDraw()).to.equal(false);2958 expect(game.getFieldValue(1, 1)).to.equal('x')2959 expect(game.getCurrentPlayerSymbol()).to.equal('o')2960 game.nextTurn(0, 1)2961 expect(game.isFinished()).to.equal(false)2962 expect(game.getWinner()).to.equal(null)2963 expect(game.noMoreTurns()).to.equal(false);2964 expect(game.isDraw()).to.equal(false);2965 expect(game.getFieldValue(0, 1)).to.equal('o')2966 expect(game.getCurrentPlayerSymbol()).to.equal('x')2967 game.nextTurn(1, 0)2968 expect(game.isFinished()).to.equal(false)2969 expect(game.getWinner()).to.equal(null)2970 expect(game.noMoreTurns()).to.equal(false);2971 expect(game.isDraw()).to.equal(false);2972 expect(game.getFieldValue(1, 0)).to.equal('o')2973 expect(game.getCurrentPlayerSymbol()).to.equal('x')2974 game.nextTurn(2, 2)2975 expect(game.isFinished()).to.equal(false)2976 expect(game.getWinner()).to.equal(null)2977 expect(game.noMoreTurns()).to.equal(false);2978 expect(game.isDraw()).to.equal(false);2979 expect(game.getFieldValue(2, 2)).to.equal('x')2980 expect(game.getCurrentPlayerSymbol()).to.equal('o')2981 game.nextTurn(1, 0)2982 expect(game.isFinished()).to.equal(false)2983 expect(game.getWinner()).to.equal(null)2984 expect(game.noMoreTurns()).to.equal(false);2985 expect(game.isDraw()).to.equal(false);2986 expect(game.getFieldValue(1, 0)).to.equal('o')2987 expect(game.getCurrentPlayerSymbol()).to.equal('o')2988 game.nextTurn(1, 2)2989 expect(game.isFinished()).to.equal(false)2990 expect(game.getWinner()).to.equal(null)2991 expect(game.noMoreTurns()).to.equal(false);2992 expect(game.isDraw()).to.equal(false);2993 expect(game.getFieldValue(1, 2)).to.equal('x')2994 expect(game.getCurrentPlayerSymbol()).to.equal('o')2995 game.nextTurn(0, 1)2996 expect(game.isFinished()).to.equal(false)2997 expect(game.getWinner()).to.equal(null)2998 expect(game.noMoreTurns()).to.equal(false);2999 expect(game.isDraw()).to.equal(false);3000 expect(game.getFieldValue(0, 1)).to.equal('o')3001 expect(game.getCurrentPlayerSymbol()).to.equal('o')3002 game.nextTurn(2, 2)3003 expect(game.isFinished()).to.equal(false)3004 expect(game.getWinner()).to.equal(null)3005 expect(game.noMoreTurns()).to.equal(false);3006 expect(game.isDraw()).to.equal(false);3007 expect(game.getFieldValue(2, 2)).to.equal('x')3008 expect(game.getCurrentPlayerSymbol()).to.equal('o')3009 game.nextTurn(2, 2)3010 expect(game.isFinished()).to.equal(false)3011 expect(game.getWinner()).to.equal(null)3012 expect(game.noMoreTurns()).to.equal(false);3013 expect(game.isDraw()).to.equal(false);3014 expect(game.getFieldValue(2, 2)).to.equal('x')3015 expect(game.getCurrentPlayerSymbol()).to.equal('o')3016 game.nextTurn(2, 0)3017 expect(game.isFinished()).to.equal(true)3018 expect(game.getWinner()).to.equal('o')3019 expect(game.noMoreTurns()).to.equal(false);3020 expect(game.isDraw()).to.equal(false);3021 expect(game.getFieldValue(2, 0)).to.equal('o')3022 expect(game.getCurrentPlayerSymbol()).to.equal('x')3023 game = new TicTacToe();3024 game.nextTurn(1, 2)3025 expect(game.isFinished()).to.equal(false)3026 expect(game.getWinner()).to.equal(null)3027 expect(game.noMoreTurns()).to.equal(false);3028 expect(game.isDraw()).to.equal(false);3029 expect(game.getFieldValue(1, 2)).to.equal('x')3030 expect(game.getCurrentPlayerSymbol()).to.equal('o')3031 game.nextTurn(0, 1)3032 expect(game.isFinished()).to.equal(false)3033 expect(game.getWinner()).to.equal(null)3034 expect(game.noMoreTurns()).to.equal(false);3035 expect(game.isDraw()).to.equal(false);3036 expect(game.getFieldValue(0, 1)).to.equal('o')3037 expect(game.getCurrentPlayerSymbol()).to.equal('x')3038 game.nextTurn(1, 1)3039 expect(game.isFinished()).to.equal(false)3040 expect(game.getWinner()).to.equal(null)3041 expect(game.noMoreTurns()).to.equal(false);3042 expect(game.isDraw()).to.equal(false);3043 expect(game.getFieldValue(1, 1)).to.equal('x')3044 expect(game.getCurrentPlayerSymbol()).to.equal('o')3045 game.nextTurn(0, 2)3046 expect(game.isFinished()).to.equal(false)3047 expect(game.getWinner()).to.equal(null)3048 expect(game.noMoreTurns()).to.equal(false);3049 expect(game.isDraw()).to.equal(false);3050 expect(game.getFieldValue(0, 2)).to.equal('o')3051 expect(game.getCurrentPlayerSymbol()).to.equal('x')3052 game.nextTurn(2, 2)3053 expect(game.isFinished()).to.equal(false)3054 expect(game.getWinner()).to.equal(null)3055 expect(game.noMoreTurns()).to.equal(false);3056 expect(game.isDraw()).to.equal(false);3057 expect(game.getFieldValue(2, 2)).to.equal('x')3058 expect(game.getCurrentPlayerSymbol()).to.equal('o')3059 game.nextTurn(0, 2)3060 expect(game.isFinished()).to.equal(false)3061 expect(game.getWinner()).to.equal(null)3062 expect(game.noMoreTurns()).to.equal(false);3063 expect(game.isDraw()).to.equal(false);3064 expect(game.getFieldValue(0, 2)).to.equal('o')3065 expect(game.getCurrentPlayerSymbol()).to.equal('o')3066 game.nextTurn(1, 0)3067 expect(game.isFinished()).to.equal(false)3068 expect(game.getWinner()).to.equal(null)3069 expect(game.noMoreTurns()).to.equal(false);3070 expect(game.isDraw()).to.equal(false);3071 expect(game.getFieldValue(1, 0)).to.equal('o')3072 expect(game.getCurrentPlayerSymbol()).to.equal('x')3073 game.nextTurn(1, 2)3074 expect(game.isFinished()).to.equal(false)3075 expect(game.getWinner()).to.equal(null)3076 expect(game.noMoreTurns()).to.equal(false);3077 expect(game.isDraw()).to.equal(false);3078 expect(game.getFieldValue(1, 2)).to.equal('x')3079 expect(game.getCurrentPlayerSymbol()).to.equal('x')3080 game.nextTurn(1, 1)3081 expect(game.isFinished()).to.equal(false)3082 expect(game.getWinner()).to.equal(null)3083 expect(game.noMoreTurns()).to.equal(false);3084 expect(game.isDraw()).to.equal(false);3085 expect(game.getFieldValue(1, 1)).to.equal('x')3086 expect(game.getCurrentPlayerSymbol()).to.equal('x')3087 game.nextTurn(1, 2)3088 expect(game.isFinished()).to.equal(false)3089 expect(game.getWinner()).to.equal(null)3090 expect(game.noMoreTurns()).to.equal(false);3091 expect(game.isDraw()).to.equal(false);3092 expect(game.getFieldValue(1, 2)).to.equal('x')3093 expect(game.getCurrentPlayerSymbol()).to.equal('x')3094 game.nextTurn(1, 0)3095 expect(game.isFinished()).to.equal(false)3096 expect(game.getWinner()).to.equal(null)3097 expect(game.noMoreTurns()).to.equal(false);3098 expect(game.isDraw()).to.equal(false);3099 expect(game.getFieldValue(1, 0)).to.equal('o')3100 expect(game.getCurrentPlayerSymbol()).to.equal('x')3101 game.nextTurn(0, 2)3102 expect(game.isFinished()).to.equal(false)3103 expect(game.getWinner()).to.equal(null)3104 expect(game.noMoreTurns()).to.equal(false);3105 expect(game.isDraw()).to.equal(false);3106 expect(game.getFieldValue(0, 2)).to.equal('o')3107 expect(game.getCurrentPlayerSymbol()).to.equal('x')3108 game.nextTurn(1, 0)3109 expect(game.isFinished()).to.equal(false)3110 expect(game.getWinner()).to.equal(null)3111 expect(game.noMoreTurns()).to.equal(false);3112 expect(game.isDraw()).to.equal(false);3113 expect(game.getFieldValue(1, 0)).to.equal('o')3114 expect(game.getCurrentPlayerSymbol()).to.equal('x')3115 game.nextTurn(2, 0)3116 expect(game.isFinished()).to.equal(false)3117 expect(game.getWinner()).to.equal(null)3118 expect(game.noMoreTurns()).to.equal(false);3119 expect(game.isDraw()).to.equal(false);3120 expect(game.getFieldValue(2, 0)).to.equal('x')3121 expect(game.getCurrentPlayerSymbol()).to.equal('o')3122 game.nextTurn(0, 1)3123 expect(game.isFinished()).to.equal(false)3124 expect(game.getWinner()).to.equal(null)3125 expect(game.noMoreTurns()).to.equal(false);3126 expect(game.isDraw()).to.equal(false);3127 expect(game.getFieldValue(0, 1)).to.equal('o')3128 expect(game.getCurrentPlayerSymbol()).to.equal('o')3129 game.nextTurn(2, 2)3130 expect(game.isFinished()).to.equal(false)3131 expect(game.getWinner()).to.equal(null)3132 expect(game.noMoreTurns()).to.equal(false);3133 expect(game.isDraw()).to.equal(false);3134 expect(game.getFieldValue(2, 2)).to.equal('x')3135 expect(game.getCurrentPlayerSymbol()).to.equal('o')3136 game.nextTurn(1, 0)3137 expect(game.isFinished()).to.equal(false)3138 expect(game.getWinner()).to.equal(null)3139 expect(game.noMoreTurns()).to.equal(false);3140 expect(game.isDraw()).to.equal(false);3141 expect(game.getFieldValue(1, 0)).to.equal('o')3142 expect(game.getCurrentPlayerSymbol()).to.equal('o')3143 game.nextTurn(0, 1)3144 expect(game.isFinished()).to.equal(false)3145 expect(game.getWinner()).to.equal(null)3146 expect(game.noMoreTurns()).to.equal(false);3147 expect(game.isDraw()).to.equal(false);3148 expect(game.getFieldValue(0, 1)).to.equal('o')3149 expect(game.getCurrentPlayerSymbol()).to.equal('o')3150 game.nextTurn(0, 2)3151 expect(game.isFinished()).to.equal(false)3152 expect(game.getWinner()).to.equal(null)3153 expect(game.noMoreTurns()).to.equal(false);3154 expect(game.isDraw()).to.equal(false);3155 expect(game.getFieldValue(0, 2)).to.equal('o')3156 expect(game.getCurrentPlayerSymbol()).to.equal('o')3157 game.nextTurn(2, 2)3158 expect(game.isFinished()).to.equal(false)3159 expect(game.getWinner()).to.equal(null)3160 expect(game.noMoreTurns()).to.equal(false);3161 expect(game.isDraw()).to.equal(false);3162 expect(game.getFieldValue(2, 2)).to.equal('x')3163 expect(game.getCurrentPlayerSymbol()).to.equal('o')3164 game.nextTurn(2, 1)3165 expect(game.isFinished()).to.equal(false)3166 expect(game.getWinner()).to.equal(null)3167 expect(game.noMoreTurns()).to.equal(false);3168 expect(game.isDraw()).to.equal(false);3169 expect(game.getFieldValue(2, 1)).to.equal('o')3170 expect(game.getCurrentPlayerSymbol()).to.equal('x')3171 game.nextTurn(0, 0)3172 expect(game.isFinished()).to.equal(true)3173 expect(game.getWinner()).to.equal('x')3174 expect(game.noMoreTurns()).to.equal(true);3175 expect(game.isDraw()).to.equal(false);3176 expect(game.getFieldValue(0, 0)).to.equal('x')3177 expect(game.getCurrentPlayerSymbol()).to.equal('o')3178 game = new TicTacToe();3179 game.nextTurn(0, 1)3180 expect(game.isFinished()).to.equal(false)3181 expect(game.getWinner()).to.equal(null)3182 expect(game.noMoreTurns()).to.equal(false);3183 expect(game.isDraw()).to.equal(false);3184 expect(game.getFieldValue(0, 1)).to.equal('x')3185 expect(game.getCurrentPlayerSymbol()).to.equal('o')3186 game.nextTurn(0, 2)3187 expect(game.isFinished()).to.equal(false)3188 expect(game.getWinner()).to.equal(null)3189 expect(game.noMoreTurns()).to.equal(false);3190 expect(game.isDraw()).to.equal(false);3191 expect(game.getFieldValue(0, 2)).to.equal('o')3192 expect(game.getCurrentPlayerSymbol()).to.equal('x')3193 game.nextTurn(0, 0)3194 expect(game.isFinished()).to.equal(false)3195 expect(game.getWinner()).to.equal(null)3196 expect(game.noMoreTurns()).to.equal(false);3197 expect(game.isDraw()).to.equal(false);3198 expect(game.getFieldValue(0, 0)).to.equal('x')3199 expect(game.getCurrentPlayerSymbol()).to.equal('o')3200 game.nextTurn(2, 2)3201 expect(game.isFinished()).to.equal(false)3202 expect(game.getWinner()).to.equal(null)3203 expect(game.noMoreTurns()).to.equal(false);3204 expect(game.isDraw()).to.equal(false);3205 expect(game.getFieldValue(2, 2)).to.equal('o')3206 expect(game.getCurrentPlayerSymbol()).to.equal('x')3207 game.nextTurn(1, 1)3208 expect(game.isFinished()).to.equal(false)3209 expect(game.getWinner()).to.equal(null)3210 expect(game.noMoreTurns()).to.equal(false);3211 expect(game.isDraw()).to.equal(false);3212 expect(game.getFieldValue(1, 1)).to.equal('x')3213 expect(game.getCurrentPlayerSymbol()).to.equal('o')3214 game.nextTurn(0, 0)3215 expect(game.isFinished()).to.equal(false)3216 expect(game.getWinner()).to.equal(null)3217 expect(game.noMoreTurns()).to.equal(false);3218 expect(game.isDraw()).to.equal(false);3219 expect(game.getFieldValue(0, 0)).to.equal('x')3220 expect(game.getCurrentPlayerSymbol()).to.equal('o')3221 game.nextTurn(2, 1)3222 expect(game.isFinished()).to.equal(false)3223 expect(game.getWinner()).to.equal(null)3224 expect(game.noMoreTurns()).to.equal(false);3225 expect(game.isDraw()).to.equal(false);3226 expect(game.getFieldValue(2, 1)).to.equal('o')3227 expect(game.getCurrentPlayerSymbol()).to.equal('x')3228 game.nextTurn(1, 1)3229 expect(game.isFinished()).to.equal(false)3230 expect(game.getWinner()).to.equal(null)3231 expect(game.noMoreTurns()).to.equal(false);3232 expect(game.isDraw()).to.equal(false);3233 expect(game.getFieldValue(1, 1)).to.equal('x')3234 expect(game.getCurrentPlayerSymbol()).to.equal('x')3235 game.nextTurn(0, 1)3236 expect(game.isFinished()).to.equal(false)3237 expect(game.getWinner()).to.equal(null)3238 expect(game.noMoreTurns()).to.equal(false);3239 expect(game.isDraw()).to.equal(false);3240 expect(game.getFieldValue(0, 1)).to.equal('x')3241 expect(game.getCurrentPlayerSymbol()).to.equal('x')3242 game.nextTurn(0, 0)3243 expect(game.isFinished()).to.equal(false)3244 expect(game.getWinner()).to.equal(null)3245 expect(game.noMoreTurns()).to.equal(false);3246 expect(game.isDraw()).to.equal(false);3247 expect(game.getFieldValue(0, 0)).to.equal('x')3248 expect(game.getCurrentPlayerSymbol()).to.equal('x')3249 game.nextTurn(1, 0)3250 expect(game.isFinished()).to.equal(false)3251 expect(game.getWinner()).to.equal(null)3252 expect(game.noMoreTurns()).to.equal(false);3253 expect(game.isDraw()).to.equal(false);3254 expect(game.getFieldValue(1, 0)).to.equal('x')3255 expect(game.getCurrentPlayerSymbol()).to.equal('o')3256 game.nextTurn(1, 0)3257 expect(game.isFinished()).to.equal(false)3258 expect(game.getWinner()).to.equal(null)3259 expect(game.noMoreTurns()).to.equal(false);3260 expect(game.isDraw()).to.equal(false);3261 expect(game.getFieldValue(1, 0)).to.equal('x')3262 expect(game.getCurrentPlayerSymbol()).to.equal('o')3263 game.nextTurn(2, 1)3264 expect(game.isFinished()).to.equal(false)3265 expect(game.getWinner()).to.equal(null)3266 expect(game.noMoreTurns()).to.equal(false);3267 expect(game.isDraw()).to.equal(false);3268 expect(game.getFieldValue(2, 1)).to.equal('o')3269 expect(game.getCurrentPlayerSymbol()).to.equal('o')3270 game.nextTurn(0, 1)3271 expect(game.isFinished()).to.equal(false)3272 expect(game.getWinner()).to.equal(null)3273 expect(game.noMoreTurns()).to.equal(false);3274 expect(game.isDraw()).to.equal(false);3275 expect(game.getFieldValue(0, 1)).to.equal('x')3276 expect(game.getCurrentPlayerSymbol()).to.equal('o')3277 game.nextTurn(1, 2)3278 expect(game.isFinished()).to.equal(true)3279 expect(game.getWinner()).to.equal('o')3280 expect(game.noMoreTurns()).to.equal(false);3281 expect(game.isDraw()).to.equal(false);3282 expect(game.getFieldValue(1, 2)).to.equal('o')3283 expect(game.getCurrentPlayerSymbol()).to.equal('x')3284 game = new TicTacToe();3285 game.nextTurn(2, 1)3286 expect(game.isFinished()).to.equal(false)3287 expect(game.getWinner()).to.equal(null)3288 expect(game.noMoreTurns()).to.equal(false);3289 expect(game.isDraw()).to.equal(false);3290 expect(game.getFieldValue(2, 1)).to.equal('x')3291 expect(game.getCurrentPlayerSymbol()).to.equal('o')3292 game.nextTurn(2, 2)3293 expect(game.isFinished()).to.equal(false)3294 expect(game.getWinner()).to.equal(null)3295 expect(game.noMoreTurns()).to.equal(false);3296 expect(game.isDraw()).to.equal(false);3297 expect(game.getFieldValue(2, 2)).to.equal('o')3298 expect(game.getCurrentPlayerSymbol()).to.equal('x')3299 game.nextTurn(1, 1)3300 expect(game.isFinished()).to.equal(false)3301 expect(game.getWinner()).to.equal(null)3302 expect(game.noMoreTurns()).to.equal(false);3303 expect(game.isDraw()).to.equal(false);3304 expect(game.getFieldValue(1, 1)).to.equal('x')3305 expect(game.getCurrentPlayerSymbol()).to.equal('o')3306 game.nextTurn(0, 1)3307 expect(game.isFinished()).to.equal(false)3308 expect(game.getWinner()).to.equal(null)3309 expect(game.noMoreTurns()).to.equal(false);3310 expect(game.isDraw()).to.equal(false);3311 expect(game.getFieldValue(0, 1)).to.equal('o')3312 expect(game.getCurrentPlayerSymbol()).to.equal('x')3313 game.nextTurn(1, 2)3314 expect(game.isFinished()).to.equal(false)3315 expect(game.getWinner()).to.equal(null)3316 expect(game.noMoreTurns()).to.equal(false);3317 expect(game.isDraw()).to.equal(false);3318 expect(game.getFieldValue(1, 2)).to.equal('x')3319 expect(game.getCurrentPlayerSymbol()).to.equal('o')3320 game.nextTurn(0, 1)3321 expect(game.isFinished()).to.equal(false)3322 expect(game.getWinner()).to.equal(null)3323 expect(game.noMoreTurns()).to.equal(false);3324 expect(game.isDraw()).to.equal(false);3325 expect(game.getFieldValue(0, 1)).to.equal('o')3326 expect(game.getCurrentPlayerSymbol()).to.equal('o')3327 game.nextTurn(2, 0)3328 expect(game.isFinished()).to.equal(false)3329 expect(game.getWinner()).to.equal(null)3330 expect(game.noMoreTurns()).to.equal(false);3331 expect(game.isDraw()).to.equal(false);3332 expect(game.getFieldValue(2, 0)).to.equal('o')3333 expect(game.getCurrentPlayerSymbol()).to.equal('x')3334 game.nextTurn(1, 2)3335 expect(game.isFinished()).to.equal(false)3336 expect(game.getWinner()).to.equal(null)3337 expect(game.noMoreTurns()).to.equal(false);3338 expect(game.isDraw()).to.equal(false);3339 expect(game.getFieldValue(1, 2)).to.equal('x')3340 expect(game.getCurrentPlayerSymbol()).to.equal('x')3341 game.nextTurn(2, 1)3342 expect(game.isFinished()).to.equal(false)3343 expect(game.getWinner()).to.equal(null)3344 expect(game.noMoreTurns()).to.equal(false);3345 expect(game.isDraw()).to.equal(false);3346 expect(game.getFieldValue(2, 1)).to.equal('x')3347 expect(game.getCurrentPlayerSymbol()).to.equal('x')3348 game.nextTurn(1, 1)3349 expect(game.isFinished()).to.equal(false)3350 expect(game.getWinner()).to.equal(null)3351 expect(game.noMoreTurns()).to.equal(false);3352 expect(game.isDraw()).to.equal(false);3353 expect(game.getFieldValue(1, 1)).to.equal('x')3354 expect(game.getCurrentPlayerSymbol()).to.equal('x')3355 game.nextTurn(1, 2)3356 expect(game.isFinished()).to.equal(false)3357 expect(game.getWinner()).to.equal(null)3358 expect(game.noMoreTurns()).to.equal(false);3359 expect(game.isDraw()).to.equal(false);3360 expect(game.getFieldValue(1, 2)).to.equal('x')3361 expect(game.getCurrentPlayerSymbol()).to.equal('x')3362 game.nextTurn(0, 0)3363 expect(game.isFinished()).to.equal(false)3364 expect(game.getWinner()).to.equal(null)3365 expect(game.noMoreTurns()).to.equal(false);3366 expect(game.isDraw()).to.equal(false);3367 expect(game.getFieldValue(0, 0)).to.equal('x')3368 expect(game.getCurrentPlayerSymbol()).to.equal('o')3369 game.nextTurn(2, 0)3370 expect(game.isFinished()).to.equal(false)3371 expect(game.getWinner()).to.equal(null)3372 expect(game.noMoreTurns()).to.equal(false);3373 expect(game.isDraw()).to.equal(false);3374 expect(game.getFieldValue(2, 0)).to.equal('o')3375 expect(game.getCurrentPlayerSymbol()).to.equal('o')3376 game.nextTurn(1, 2)3377 expect(game.isFinished()).to.equal(false)3378 expect(game.getWinner()).to.equal(null)3379 expect(game.noMoreTurns()).to.equal(false);3380 expect(game.isDraw()).to.equal(false);3381 expect(game.getFieldValue(1, 2)).to.equal('x')3382 expect(game.getCurrentPlayerSymbol()).to.equal('o')3383 game.nextTurn(1, 0)3384 expect(game.isFinished()).to.equal(false)3385 expect(game.getWinner()).to.equal(null)3386 expect(game.noMoreTurns()).to.equal(false);3387 expect(game.isDraw()).to.equal(false);3388 expect(game.getFieldValue(1, 0)).to.equal('o')3389 expect(game.getCurrentPlayerSymbol()).to.equal('x')3390 game.nextTurn(1, 1)3391 expect(game.isFinished()).to.equal(false)3392 expect(game.getWinner()).to.equal(null)3393 expect(game.noMoreTurns()).to.equal(false);3394 expect(game.isDraw()).to.equal(false);3395 expect(game.getFieldValue(1, 1)).to.equal('x')3396 expect(game.getCurrentPlayerSymbol()).to.equal('x')3397 game.nextTurn(0, 2)3398 expect(game.isFinished()).to.equal(true)3399 expect(game.getWinner()).to.equal(null)3400 expect(game.noMoreTurns()).to.equal(true);3401 expect(game.isDraw()).to.equal(true);3402 expect(game.getFieldValue(0, 2)).to.equal('x')3403 expect(game.getCurrentPlayerSymbol()).to.equal('o')3404 game = new TicTacToe();3405 game.nextTurn(1, 1)3406 expect(game.isFinished()).to.equal(false)3407 expect(game.getWinner()).to.equal(null)3408 expect(game.noMoreTurns()).to.equal(false);3409 expect(game.isDraw()).to.equal(false);3410 expect(game.getFieldValue(1, 1)).to.equal('x')3411 expect(game.getCurrentPlayerSymbol()).to.equal('o')3412 game.nextTurn(1, 1)3413 expect(game.isFinished()).to.equal(false)3414 expect(game.getWinner()).to.equal(null)3415 expect(game.noMoreTurns()).to.equal(false);3416 expect(game.isDraw()).to.equal(false);3417 expect(game.getFieldValue(1, 1)).to.equal('x')3418 expect(game.getCurrentPlayerSymbol()).to.equal('o')3419 game.nextTurn(2, 1)3420 expect(game.isFinished()).to.equal(false)3421 expect(game.getWinner()).to.equal(null)3422 expect(game.noMoreTurns()).to.equal(false);3423 expect(game.isDraw()).to.equal(false);3424 expect(game.getFieldValue(2, 1)).to.equal('o')3425 expect(game.getCurrentPlayerSymbol()).to.equal('x')3426 game.nextTurn(0, 2)3427 expect(game.isFinished()).to.equal(false)3428 expect(game.getWinner()).to.equal(null)3429 expect(game.noMoreTurns()).to.equal(false);3430 expect(game.isDraw()).to.equal(false);3431 expect(game.getFieldValue(0, 2)).to.equal('x')3432 expect(game.getCurrentPlayerSymbol()).to.equal('o')3433 game.nextTurn(0, 0)3434 expect(game.isFinished()).to.equal(false)3435 expect(game.getWinner()).to.equal(null)3436 expect(game.noMoreTurns()).to.equal(false);3437 expect(game.isDraw()).to.equal(false);3438 expect(game.getFieldValue(0, 0)).to.equal('o')3439 expect(game.getCurrentPlayerSymbol()).to.equal('x')3440 game.nextTurn(1, 2)3441 expect(game.isFinished()).to.equal(false)3442 expect(game.getWinner()).to.equal(null)3443 expect(game.noMoreTurns()).to.equal(false);3444 expect(game.isDraw()).to.equal(false);3445 expect(game.getFieldValue(1, 2)).to.equal('x')3446 expect(game.getCurrentPlayerSymbol()).to.equal('o')3447 game.nextTurn(0, 0)3448 expect(game.isFinished()).to.equal(false)3449 expect(game.getWinner()).to.equal(null)3450 expect(game.noMoreTurns()).to.equal(false);3451 expect(game.isDraw()).to.equal(false);3452 expect(game.getFieldValue(0, 0)).to.equal('o')3453 expect(game.getCurrentPlayerSymbol()).to.equal('o')3454 game.nextTurn(2, 2)3455 expect(game.isFinished()).to.equal(false)3456 expect(game.getWinner()).to.equal(null)3457 expect(game.noMoreTurns()).to.equal(false);3458 expect(game.isDraw()).to.equal(false);3459 expect(game.getFieldValue(2, 2)).to.equal('o')3460 expect(game.getCurrentPlayerSymbol()).to.equal('x')3461 game.nextTurn(1, 0)3462 expect(game.isFinished()).to.equal(true)3463 expect(game.getWinner()).to.equal('x')3464 expect(game.noMoreTurns()).to.equal(false);3465 expect(game.isDraw()).to.equal(false);3466 expect(game.getFieldValue(1, 0)).to.equal('x')3467 expect(game.getCurrentPlayerSymbol()).to.equal('o')3468 });3469 });...

Full Screen

Full Screen

gateway.js

Source:gateway.js Github

copy

Full Screen

...82{83 84 if ( currentType == 'modem' )85 {86 var port = getFieldValue( 'modemFields input[id=port]' );87 var baudRate = getFieldValue( 'modemFields input[id=baudRate]' );88 if ( port == "" || baudRate == "")89 { 90 showErrorMessage( i18n_required_data_error );91 }92 else93 {94 lockScreen(); 95 jQuery.postJSON( "saveModemConfig.action", {96 gatewayType: getFieldValue( 'gatewayType' ),97 name: getFieldValue( 'modemFields input[id=name]' ),98 port: getFieldValue( 'modemFields input[id=port]' ),99 baudRate: getFieldValue( 'modemFields input[id=baudRate]' ),100 pollingInterval: getFieldValue( 'modemFields input[id=pollingInterval]' ),101 manufacturer: getFieldValue( 'modemFields input[id=manufacturer]' ),102 model: getFieldValue( 'modemFields input[id=model]' ),103 pin: getFieldValue( 'modemFields input[id=pin]' ),104 inbound: getFieldValue( 'modemFields select[id=inbound]' ),105 outbound: getFieldValue( 'modemFields select[id=outbound]' )106 }, function ( json ) {107 unLockScreen();108 showMessage( json );109 } );110 }111 }112 else if ( currentType == 'bulksms' )113 {114 var username = getFieldValue( 'bulksmsFields input[id=username]' );115 var password = getFieldValue( 'bulksmsFields input[id=password]' );116 if ( username == "" || password == "")117 { 118 showErrorMessage( i18n_required_data_error );119 }120 else121 {122 lockScreen();123 jQuery.postJSON( "saveBulkSMSConfig.action", {124 gatewayType: getFieldValue( 'gatewayType' ),125 name: getFieldValue( 'bulksmsFields input[id=name]' ),126 username: getFieldValue( 'bulksmsFields input[id=username]' ),127 password: getFieldValue( 'bulksmsFields input[id=password]' ),128 region: getFieldValue( 'bulksmsFields select[id=region]' )129 }, function ( json ) {130 unLockScreen();131 showMessage( json );132 } );133 }134 }135 else if ( currentType == 'smpp_gw' )136 {137 var username = getFieldValue( 'smppFields input[id=username]' );138 var password = getFieldValue( 'smppFields input[id=password]' );139 if ( username == "" || password == "")140 { 141 showErrorMessage( i18n_required_data_error );142 }143 else144 {145 lockScreen();146 jQuery.postJSON( "updateSMPPConfig.action", {147 gatewayType: getFieldValue( 'gatewayType' ),148 name: getFieldValue( 'smppFields input[id=name]' ),149 username: getFieldValue( 'smppFields input[id=username]' ),150 password: getFieldValue( 'smppFields input[id=password]' ),151 port: getFieldValue( 'smppFields input[id=port]' ),152 address: getFieldValue( 'smppFields input[id=address]' ),153 }, function ( json ) {154 unLockScreen();155 showMessage( json );156 } );157 }158 }159 else if ( currentType == 'clickatell' )160 {161 var username = getFieldValue( 'clickatellFields input[id=username]' );162 var password = getFieldValue( 'clickatellFields input[id=password]' );163 if ( username == "" || password == "")164 { 165 showErrorMessage( i18n_required_data_error );166 }167 else168 {169 lockScreen();170 jQuery.postJSON( "saveClickatellConfig.action", {171 gatewayType: getFieldValue( 'gatewayType' ),172 name: getFieldValue( 'clickatellFields input[id=name]' ),173 username: getFieldValue( 'clickatellFields input[id=username]' ),174 password: getFieldValue( 'clickatellFields input[id=password]' ),175 apiId: getFieldValue( 'clickatellFields input[id=apiId]' )176 }, function ( json ) {177 unLockScreen();178 showMessage( json );179 } );180 }181 }182 else183 {184 var username = getFieldValue( 'genericHTTPFields input[id=username]' );185 var password = getFieldValue( 'genericHTTPFields input[id=password]' );186 var URL = getFieldValue( 'genericHTTPFields input[id=urlTemplate]' );187 if( username == "" || password == "" || URL == "" )188 { 189 showErrorMessage( i18n_required_data_error );190 }191 else192 {193 lockScreen();194 jQuery.postJSON( "saveHTTPConfig.action", {195 gatewayType: getFieldValue( 'gatewayType' ),196 name: getFieldValue( 'genericHTTPFields input[id=name]' ),197 username: getFieldValue( 'genericHTTPFields input[id=username]' ),198 password: getFieldValue( 'genericHTTPFields input[id=password]' ),199 urlTemplate: getFieldValue( 'genericHTTPFields input[id=urlTemplate]' )200 }, function ( json ) {201 unLockScreen();202 showMessage( json );203 } );204 }205 }206}207function showMessage( json )208{209 if ( json.response == "success" ) {210 showSuccessMessage( i18n_add_update_success );211 } else {212 showErrorMessage( json.message, 7000 );213 }...

Full Screen

Full Screen

turtle_generators.js

Source:turtle_generators.js Github

copy

Full Screen

1"use strict";2Blockly.JavaScript["turtle_main"] = function(block)3{4 var body = Blockly.JavaScript.statementToCode(block, "TÖRZS");5 var delay = block.getFieldValue("SEBESSÉG");6 7 turtle.wait = delay;8 return body;9};10Blockly.JavaScript["turtle_go"] = function(block)11{12 var dir = block.getFieldValue("IRÁNY");13 var dist = block.getFieldValue("MENNYIT");14 15 return "go(" + dir + ", " + dist + ");\n";16};17Blockly.JavaScript["turtle_turn"] = function(block)18{19 var dir = block.getFieldValue("IRÁNY");20 var deg = block.getFieldValue("MENNYIT");21 22 return "turn(" + dir + ", " + deg + ");\n";23};24Blockly.JavaScript["turtle_fill"] = function(block)25{26 return "fill();\n";27};28Blockly.JavaScript["turtle_pen"] = function(block)29{30 return "set('down', " + (block.getFieldValue("IRÁNY") === "true") + ");\n";31};32Blockly.JavaScript["turtle_fill_color"] = function(block)33{34 return "set('fillcolor', '" + block.getFieldValue("SZÍN") + "');\n";35};36Blockly.JavaScript["turtle_line_color"] = function(block)37{38 return "set('linecolor', '" + block.getFieldValue("SZÍN") + "');\n";39};40Blockly.JavaScript["turtle_line_width"] = function(block)41{42 return "set('linewidth', " + block.getFieldValue("VASTAGSÁG") + ");\n";43};44Blockly.JavaScript["turtle_home"] = function(block)45{46 return "home();\n";47};48Blockly.JavaScript["turtle_for"] = function(block)49{50 var stop = block.getFieldValue("ISMÉTELD");51 var body = Blockly.JavaScript.statementToCode(block, "TÖRZS");52 var i = "i" + block.id.replace(/\W/g, "").substring(0, 2);53 54 return "for (var " + i + "=0; " + i + "<" + stop + "; " + i + "++) {\n" + body + "}\n";55};56Blockly.JavaScript["turtle_while"] = function(block)57{58 var stop = block.getFieldValue("ISMÉTELD");59 var body = Blockly.JavaScript.statementToCode(block, "TÖRZS");60 var i = "i" + block.id.replace(/\W/g, "").substring(0, 2);61 62 return "while (" + stop + ") {\n" + body + "}\n";63};64Blockly.JavaScript["turtle_if"] = function(block)65{66 var expr = block.getFieldValue("FELTÉTEL");67 var body_if = Blockly.JavaScript.statementToCode(block, "HA");68 69 return "if (" + expr + ") {\n" + body_if + "}\n";70};71Blockly.JavaScript["turtle_if_else"] = function(block)72{73 var expr = block.getFieldValue("FELTÉTEL");74 var body_if = Blockly.JavaScript.statementToCode(block, "HA");75 var body_else = Blockly.JavaScript.statementToCode(block, "KÜLÖNBEN");76 77 return "if (" + expr + ") {\n" + body_if + "}\nelse {\n" + body_else + "}\n";78};79Blockly.JavaScript["turtle_variable_define"] = function(block)80{81 var name = block.getFieldValue("NÉV");82 var value = block.getFieldValue("ÉRTÉK");83 84 return "var " + name + "=" + value + ";\n";85};86Blockly.JavaScript["turtle_random_number"] = function(block)87{88 var name = block.getFieldValue("NÉV");89 var min = block.getFieldValue("TÓL");90 var max = block.getFieldValue("IG");91 92 return "var " + name + " = randomnumber(" + min + ", " + max + ");\n";93};94Blockly.JavaScript["turtle_function_define"] = function(block)95{96 var name = block.getFieldValue("NÉV");97 var args = block.getFieldValue("PARAMÉTEREK");98 args = (args === "paraméterek") ? "" : args;99 var body = Blockly.JavaScript.statementToCode(block, "TÖRZS");100 101 return "function " + name + "(" + args + ") {\n" + body + "}\n";102};103Blockly.JavaScript["turtle_function_call"] = function(block)104{105 var name = block.getFieldValue("NÉV");106 var args = block.getFieldValue("PARAMÉTEREK");107 args = (args === "paraméterek") ? "" : args;108 109 return name + "(" + args + ");\n";110};111Blockly.JavaScript["turtle_random_color"] = function(block)112{113 var which = block.getFieldValue("MELYIK");114 var color = block.getFieldValue("SZÍNEK");115 console.log(typeof color);116 117 return "randomcolor('" + which + "', '" + color + "');\n";...

Full Screen

Full Screen

Using AI Code Generation

copy

Full Screen

1import { getFieldValue } from 'storybook-root';2console.log(getFieldValue('field1'));3import { getFieldValue } from 'storybook-root';4console.log(getFieldValue('field1'));5import { getFieldValue } from 'storybook-root';6console.log(getFieldValue('field1'));7import { getFieldValue } from 'storybook-root';8console.log(getFieldValue('field1'));9import { getFieldValue } from 'storybook-root';10console.log(getFieldValue('field1'));11import { getFieldValue } from 'storybook-root';12console.log(getFieldValue('field1'));13import { getFieldValue } from 'storybook-root';14console.log(getFieldValue('field1'));15import { getFieldValue } from 'storybook-root';16console.log(getFieldValue('field1'));17import { getFieldValue } from 'storybook-root';18console.log(getFieldValue('field1'));19import { getFieldValue } from 'storybook-root';20console.log(getFieldValue('field1'));21import { getFieldValue } from 'storybook-root';22console.log(getFieldValue('field1'));23import { getFieldValue } from 'storybook-root';24console.log(getFieldValue('field1'));25import { getFieldValue } from 'storybook-root';26console.log(getFieldValue('field1'));27import { getFieldValue } from 'storybook-root';28console.log(getFieldValue('field1'));

Full Screen

Using AI Code Generation

copy

Full Screen

1import { getFieldValue } from 'storybook-root';2const value = getFieldValue('myField');3console.log(value);4{5}6const getFieldValue = (fieldName) => {7 return document.getElementById(fieldName).value;8};9export { getFieldValue };10import { getFieldValue } from 'storybook-root';11const value = getFieldValue('myField');12console.log(value);13{14 "scripts": {15 }16}17const getFieldValue = (fieldName) => {18 return document.getElementById(fieldName).value;19};20export { getFieldValue };21module.exports = {22 webpackFinal: async (config) => {23 config.resolve.alias['storybook-root'] = path.resolve(__dirname, '../');24 return config;25 },26};27import '../src/index.css';28import '../src/index.css';29import { withA11y } from '@storybook/addon-a11y';30export const decorators = [withA11y];31import '../src/index.css';32import { withA11y } from '@storybook/addon-a11y';33export const decorators = [withA11y];34export const parameters = {35 actions: { argTypesRegex: '^on[A-Z].*' },36};37import '../src/index.css';38import { withA11y } from '@storybook/addon-a11y';39export const decorators = [withA11y];40export const parameters = {41 actions: { argTypesRegex: '^on[A-Z].*' },42 backgrounds: {43 {44 },45 {

Full Screen

Using AI Code Generation

copy

Full Screen

1import { getFieldValue } from 'storybook-root'2const value = getFieldValue('myField')3import { getFieldValue } from 'storybook-root'4const value = getFieldValue('myField')5import { getFieldValue } from 'storybook-root'6const value = getFieldValue('myField')7import { getFieldValue } from 'storybook-root'8const value = getFieldValue('myField')9import { getFieldValue } from 'storybook-root'10const value = getFieldValue('myField')11import { getFieldValue } from 'storybook-root'12const value = getFieldValue('myField')13import { getFieldValue } from 'storybook-root'14const value = getFieldValue('myField')15import { getFieldValue } from 'storybook-root'16const value = getFieldValue('myField')17import { getFieldValue } from 'storybook-root'18const value = getFieldValue('myField')19import { getFieldValue } from 'storybook-root'20const value = getFieldValue('myField')21import { getFieldValue } from 'storybook-root

Full Screen

Using AI Code Generation

copy

Full Screen

1const storybookRoot = document.querySelector('storybook-root');2const inputElement = storybookRoot.shadowRoot.querySelector('input');3console.log(inputElement.value);4console.log(inputElement.getAttribute('value'));5console.log(storybookRoot.getFieldValue());6const storybookRoot = document.querySelector('storybook-root');7const inputElement = storybookRoot.shadowRoot.querySelector('input');8console.log(inputElement.value);9console.log(inputElement.getAttribute('value'));10console.log(storybookRoot.getFieldValue());11I have a custom element that has a method called getFieldValue() , which returns the value of the input element inside the custom element. I want to use this method in my test.js file. I have tried the following:12const inputElement = storybookRoot.shadowRoot.querySelector('input');13console.log(inputElement.value);14console.log(inputElement.getAttribute('value'));15console.log(storybookRoot.getFieldValue());16I am trying to write a test case for a custom element that has a method called getFieldValue() . The method returns the value of the input element inside the custom element. I am able to get the value of the input element using the following code:17const storybookRoot = document.querySelector('storybook-root');18const inputElement = storybookRoot.shadowRoot.querySelector('input');19console.log(inputElement.value);20console.log(inputElement.getAttribute('value'));21But I want to use the getFieldValue() method instead of getting the value of the input element. I have tried the following:22const storybookRoot = document.querySelector('storybook-root');23console.log(storybookRoot.getFieldValue());24I am trying to write a test case for a custom element that has a method called getFieldValue() . The method returns the value of the input element inside the custom element. I am able to get the value of the input element using the following code:

Full Screen

Using AI Code Generation

copy

Full Screen

1import { getFieldValue } from 'storybook-root';2const value = getFieldValue('Field_Name');3console.log(value);4export const getFieldValue = (fieldName) => {5 const value = window.parent.Xrm.Page.getAttribute(fieldName).getValue();6 return value;7}

Full Screen

Using AI Code Generation

copy

Full Screen

1var myField = getFieldValue("myField");2console.log(myField);3var myField = getFieldValue("myField");4console.log(myField);5var myField = getFieldValue("myField");6console.log(myField);7var myField = getFieldValue("myField");8console.log(myField);9var myField = getFieldValue("myField");10console.log(myField);11var myField = getFieldValue("myField");12console.log(myField);13var myField = getFieldValue("myField");14console.log(myField);15var myField = getFieldValue("myField");16console.log(myField);17var myField = getFieldValue("myField");18console.log(myField);

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run storybook-root automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful