bug fix+new feature

now updates chip stack
fixed index error bug when dealing a card
added a test file