Many naughty children have been ordered to hand over video game controllers and disks to their rightful owners. Now Activision, makers of Guitar Hero, have suffered the same fate.

It’s the result of a legal case involving Activision and Genius Products, both of whom are working on DJ-related games. Genius is working on a game named Scratch: The Ultimate DJ, which it outsourced to developers 7 Studios. Activision made an offer to buy the rights to the game, which Genius turned down.

However, 7 Studios had financial difficulties and was bought out by Activision. As you’d imagine, Genius didn’t take too kindly to this once it realised Activision was working on its own game, DJ Hero – and now had access to the code behind Scratch. It immediately cut off dealings with Scratch.

The dispute wound up in court, where a judge ruled that Activision must hand over the code for Scratch, noting that Genius had paid 7 Studios around $6 million for the work and had full rights to it, despite the takeover.

The judge appeared bemused at Activision’s arguments that it shouldn’t have to give back the code, noting “No matter how you slice this banana, they are entitled to the work product back.” He later added “It is theirs. It belongs to them. They paid $6 million for it. I’m done.”

The ruling also forces Activision to hand over designs for controllers specially made for the Scratch game, and bans 7 Studios staff from sharing any information about Scratch with their new bosses at Activision.

However, the judge did not agree to Genius’ request for a one-year injunction blocking Activision from releasing a rival game. There will be another hearing on May 6 to settle Activision’s counter-claim that Genius should pay damages for cancelling its contract with 7 Studios.