from Board import Board
from Player import Player
import pytest
import sys

board = Board()
player = Player('player')


def test_rolls():
    for _ in range(1,100):
    	roll = player.roll()
    	assert roll > 0 and roll <=12

def test_tile_names():
    print("testing tile names")
    go_test = board.get_tile(0) 
    assert str(go_test.name[0]) == "Go"
    
    parking_test = board.get_tile(20)
    assert str(parking_test.name[0] == "Free Parking")

def test_board_tile_num():
    assert len(board.tile_list ) == 40


def test_landing_on_go():
	player.money = 0
	print("player money is " + str(player.money))
	rolled_num = 0
	print("Current tile is {}".format( board.get_tile(rolled_num)))
	money = player.money # should equal zero
	print("player money is " + str(player.money))

	# assert money == 0
	# board.move_player(player,rolled_num)
	# money_after_landing_on_go = player.money
	# assert money_after_landing_on_go == 400

	
	assert str(board.get_tile(rolled_num).name[0]) == "Go"
	
	# assert 