Wrote deal function and updated war function
synced with changes