Tamagotchi Connection Key Code

Introduction

Please read the link https://en.wikipedia.org/wiki/Tamagotchi to know more about TamagotchiThis is a very basic simulation of the game using command line

Design

Mar 09, 2008  A very detailed blog about the new Familitchi / Famitama / Tamagotchi V5 by Bandai. Include loads of crystal clear photos, detailed day-by-day. Cheats, codes, passwords, hints, tips, tricks, help and Easter eggs for the Handheld Games game, Tamagotchi Connexion.

Handling Events

In Tamagotchi world two types of event occurs

  • external event (initiated by the user) [e.g feeding the pet, playing with the pet]
  • internal event (auto generated by the game itself) [pet getting hungry, pet passing motion]

As such the game should be able to handle both of these events. The way these events are handled is by using the concept of single threaded event loop. The javascript engine in any browser is a classical example of single threaded event loop. Javascript in a similar fashion handles events like 'mouse click', 'network connection success' etc by having a single queue where event are added and a single threaded loop which processes those event.

Notion of Time

There is also a need to maintain the notion of time passage. The passage of time in this case would be virtual time and has no relation with the real world time. This is generated in Tamagotchi world using the concept of ticks (similar to how processor generates tick based upon the clock). The system allows two things to be configured

  • How often to generate tick. For example, we can specify that one tick should be generated every 1 sec. Where the 1 sec is real world 1 sec. Tthis is achieved through the java sleep API
  • What does one tick means in Tamagotchi world. In here we can say 1 tick = 1 hr in tamagotchi world. This conversion will be used by events to emulate the notion of passage of time

Event

All event needs to extend from the abstract class Event shown below

Few key things to note

  • Declaration of enum for new event (The universe uses this key to keep track of when an event occur)
  • Configuration: class contains all configuration data e.g. how often to feel hungry, maximum pet age
  • GenerateEvent: allows any event to also create another event. All you need to do is generateEvent.accept(<Event Class Name>)
  • Time: class to convert tick to virtual time
  • action method is where the main logic goes. The universe class calls this method for every tick
  • The action method can return an Optional Message Object which will be passed back to the outside world e.g. GUI, CLI etc

Tamagotchi Universe

Tamagotchi Connection Key Code

The universe is created by passing

  • pet
  • configuration information.

The universe is a single thread loop that does the following

  • generate a tick to indicate the passage of time
  • process any user generated events
  • process implicit events like hunger etc

The universe ends when the pet dies

Pet

The Pet class maintains all the state

  • name
  • age
  • sex
  • stats like happiness , health
  • state [AWAKE, SLEEP, PLAYING]
  • event tracker to keep track when an event occurred

The pet dies if any of the following condition are met

  • any of the stats fall below zero
  • age > max age

Since the Tamagotchi world is designed as a Event Loop there is no need of locks to ensure the safety of the Pet object as at any given time only one event is acting on the Pet object

Requirements

  • java 1.8

Game Play

  • building the jar using the command ./gradlew jar
  • locate the jar in the folder buildlibs
  • launch the game via the command java -jar tamagotchi-1.0-SNAPSHOT.jar

clean

./gradlew clean

build jar

./gradlew jar

test

Tamagotchi connection key code list

./gradlew test

Find Bugs

./gradlew check

Code Coverage

./gradlew test jacocoTestReport

Tamagotchi Connection 4 Buttons

Tamagotchi Connection Version 3 Codes

The following is a collection of Tamagotchi Connection Version 3 Codes. If I'm missing any, please let me know.

  • AABBCACB: Cost: 2800 Points.
    This code will give you the Remote Control Car. It will appear under the Items menu. You can have your Tamagotchi play with this item.
  • CACABABC: Cost: 2500 Points.
    This code will give you a Stuffed Animal. It will appear under the Items menu. This code will make your Tamagotchi character dress up like Nyatchi. (Japanese P2 character)
  • ACBBBACC: Cost: 400 Points.
    This code will give you the Hairgel item. It will appear under the Items menu. When used it will give your Tamagotchi character a funky hairstyle.
  • ABBAACBA: Cost: 600 Points.
    This code will make the Cake item appear in the Snacks menu. Your Tamagotchi can eat this.
  • BCABACBC: Cost: 800 Points.
    This code will make the Steak item appear in the Meal menu. Your Tamagotchi can eat this.
  • CBACCABC: Cost: 4000 Points.
    This code will give you the Cuckoo Clock. It will appear under the Items menu. When used near the top of the hour, it will make a cute Cuckoo animation and sound.
  • BCBCCABA: Cost: 2000 Points.
    This code gives the Love Potion. The love potion is very important. When your Tamagotchi boy and girl reaches the age of 7, they will need to become good friends before they can have children. Typically this involves connecting several times to build up the friendship up to four happy faces all the way up to four hearts. Sometimes there's simply not enough time to do this. So this is where the Love Potion comes in handy. First you feed this item to one of the adult Tamagotchi and than connect the two Tamagotchi. Select Visit. It should only take once or so and the Love Potion should make your Tamagotchi fall in love. I did not have to use the Love Potion on both of my adults, but if it doesn't work you may want to try that.
  • Secret Item:
    The is a Costume. It looks sort of like a Batman costume. You can access the Costume from the Items menu. See information below for details on obtaining this item.

How to use these codes: Go to the shop and press the 'A' button (left button) several times. Eventually the shop keeper will get a shocked expression on his face. At this time start entering the key combinations above. You will only hear beeps as you enter the codes. The left button is 'A' the middle button is 'B' and the right button is 'C'.

Key Code Java

If you enter the code exactly than you will get the item associated with the code. The first time you enter these codes you will not have to pay any Gotchi Points. But be prepared, any times after your first free one and you must have the Gotchi Points to be able to obtain these items again.

Key Code Call Of Duty

Secret Item: There is a small trick to this. When you enter all of the codes in a row, the last 7th code you enter will not yield the item I have listed above. Instead you will get a secret item - the costume. To get the 7th item you will need to enter it again.