Ho: p = 0.5
Ha: p != 0.5
by using the binomial distribution with n = 40 trials and a hypothesized p = 0.5, with the observed number of wins constituting the test statistic. the p-value then would be twice the probability of observing at least a more extreme number of wins than 24. you can also use a normal test here with the same result.
it looks to me like there's insufficient evidence to say the game is not fair btw (at any common level of significance), unless you were to use the alternative hypothesis
Ha: p > .5
in which case you might (barely) reject Ho using a normal test.