Pirate Code is similar to the game Mastermind (where you try to crack your opponent's secret color code of pegs). First you build the game itself from the provided Lego components, then 2-4 people can play the code game.
Once the game is assembled, players set up their own secret code by placing 4 of the colored jewels inside their treasure chest. Players then take turns rolling the die, selecting colored jewels to 'guess' the codes of the other players. Similar to Mastermind, jewel placement is confirmed as correct/right place, correct/wrong place, or not correct at all. Play continues until all the codes have been cracked; last person standing is the winner.