I notice that you've got a direction field for your bullets, but that you don't use it. Instead, you're using a local direction variable only. (That's kind of confusing to have to direction variables.)
So my suggestions are:
a) When you create the bullet, set its direction according to the arrow key that is pressed (b.bullet\direction = direction)
b) When you draw the bullets, make sure you reference "if b\direction...", not just "if direction...".
So my suggestions are:
a) When you create the bullet, set its direction according to the arrow key that is pressed (b.bullet\direction = direction)
b) When you draw the bullets, make sure you reference "if b\direction...", not just "if direction...".