In Ender's Game, Orson Scott Card certainly used very direct, literal language to express the story and its themes. However, we can find a few literary devices, including a couple of metaphors.
One metaphor can be found in the first chapter soon after Ender has his monitor removed from the back of his neck. Now that Ender is no longer being constantly monitored, he fears being bullied because he knows no one will come to his rescue. Just as he fears, he is instantly surrounded by bullies the moment class is over. In reference to the fact that Ender has had the monitor removed, the bullies taunt in chorus, "Lost your birdie, Thirdie." The term "thirdie" of course literally refers to the fact that he is a third child, made legal via special permission. But the phrase "lost your birdie" metaphorically refers to the monitor. The monitor was not literally a birdie; however, the monitor "perched on his neck" and allowed those observing Ender to see and hear absolutely everything Ender saw and heard, as if he had a bird perched on his neck spying on the world around him. Hence, in calling a monitor a birdie, the writer is drawing a comparison between the monitor and a bird, making this a clear example of a metaphor.
A second example of a metaphor can be found in chapter 4, as he is boarding the space shuttle to be taken to Battle School. As he boards, he remembers that he once learned absence of gravity can make people feel disoriented, especially children. After making his way to his seat and strapping himself in, he imagines "the ship dangling upside down on the undersurface of the Earth, the giant fingers of gravity holding them firmly in place." Here, gravity does not literally have giant fingers, so we know the author is comparing gravity to giant fingers to capture gravity's firm hold on the Earth. The sentence containing the metaphor plus his next thoughts, "But we will slip away ... We are going to fall off this planet," help develop the author's theme concerning just how severely totalitarian military power drastically changes life on Earth.