Advancing the Pokemon

I’m not unstuck yet, but I am advancing a bit.

I just finished playing with the code a bit trying to tackle one small problem at a time rather than trying to solve the whole thing all at once. This strategy has proven more and more successful as the program has grown.

Please note that there are several superfluous statements here in order to follow the process more closely. At this point I have been trying to get the points taken care of properly and recognize when someone has less that 1 pt left (making them dead). 

The next steps are to pop dead pokemon out of the player / computer’s hand and then advance the remaining pokemon to the fore.

Here’s a copy of the text from the latest run:

**************

**********

Player’s hand is empty.

**********

Computer’s hand is empty.

**********

**********

IDNumber = 1, name = Pikachu

IDNumber = 2, name = Froky

IDNumber = 3, name = FurFrou

IDNumber = 4, name = Meowth

IDNumber = 5, name = BunnleBy

IDNumber = 6, name = BeeDrill

IDNumber = 7, name = Gloom

IDNumber = 8, name = Diglett

**********

Player, please choose a Pokemon from the draw pile (enter ID number)

4

You chose number 4, Meowth

player’s hand:

IDNumber = 4, name = Meowth

IDNumber = 0, name = 

**********

IDNumber = 1, name = Pikachu

IDNumber = 2, name = Froky

IDNumber = 3, name = FurFrou

IDNumber = 5, name = BunnleBy

IDNumber = 6, name = BeeDrill

IDNumber = 7, name = Gloom

IDNumber = 8, name = Diglett

**********

**********

computer’s hand:

IDNumber = 5, name = BunnleBy

IDNumber = 0, name = 

**********

IDNumber = 1, name = Pikachu

IDNumber = 2, name = Froky

IDNumber = 3, name = FurFrou

IDNumber = 6, name = BeeDrill

IDNumber = 7, name = Gloom

IDNumber = 8, name = Diglett

**********

Player, please choose a Pokemon from the draw pile (enter ID number)

7

You chose number 7, Gloom

player’s hand:

IDNumber = 4, name = Meowth

IDNumber = 7, name = Gloom

**********

IDNumber = 1, name = Pikachu

IDNumber = 2, name = Froky

IDNumber = 3, name = FurFrou

IDNumber = 6, name = BeeDrill

IDNumber = 8, name = Diglett

**********

**********

computer’s hand:

IDNumber = 5, name = BunnleBy

IDNumber = 2, name = Froky

**********

Finished drawing cards.

 

 

 

 

 

 

**********

IDNumber = 4, name = Meowth

IDNumber = 7, name = Gloom

**********

IDNumber = 5, name = BunnleBy

IDNumber = 2, name = Froky

**********

**********

Which Pokemon will you send into battle? (select ID number)

IDNumber = 4, name = Meowth

IDNumber = 7, name = Gloom

7

Gloom is the player’s current Pokemon.

Froky is the computer’s current Pokemon.

 

 

 

 

 

 

 

 

 

 

Player’s Deck

—————

IDNumber = 4 Name = Meowth, hp = 100 Status: alive

IDNumber = 7 Name = Gloom, hp = 100 Status: alive

 

 

Computer’s Deck

—————

IDNumber = 5 Name = BunnleBy, hp = 100 Status: alive

IDNumber = 2 Name = Froky, hp = 100 Status: alive

Select an attack (by number):

Attack 1 = Acid

Attack 2 = Swwet Scent

Attack 3 = Poison Powder

3

Gloom attacks Froky using Poison Powder

Begin Battle

Yes! Hit.

Gloom scores 45 using Poison Powder.

End Battle

player turn = false

 

 

 

 

 

 

 

 

 

 

Player’s Deck

—————

IDNumber = 4 Name = Meowth, hp = 100 Status: alive

IDNumber = 7 Name = Gloom, hp = 100 Status: alive

 

 

Computer’s Deck

—————

IDNumber = 5 Name = BunnleBy, hp = 100 Status: alive

IDNumber = 2 Name = Froky, hp = 55 Status: alive

 

 

 

 

 

 

 

 

 

 

Player’s Deck

—————

IDNumber = 4 Name = Meowth, hp = 100 Status: alive

IDNumber = 7 Name = Gloom, hp = 100 Status: alive

 

 

Computer’s Deck

—————

IDNumber = 5 Name = BunnleBy, hp = 100 Status: alive

IDNumber = 2 Name = Froky, hp = 55 Status: alive

Select an attack (by number):

Attack 1 = Acid

Attack 2 = Swwet Scent

Attack 3 = Poison Powder

3

Gloom attacks Froky using Poison Powder

Begin Battle

missed – Drat!!

End Battle

player turn = false

 

 

 

 

 

 

 

 

 

 

Player’s Deck

—————

IDNumber = 4 Name = Meowth, hp = 100 Status: alive

IDNumber = 7 Name = Gloom, hp = 100 Status: alive

 

 

Computer’s Deck

—————

IDNumber = 5 Name = BunnleBy, hp = 100 Status: alive

IDNumber = 2 Name = Froky, hp = 55 Status: alive

 

 

 

 

 

 

 

 

 

 

Player’s Deck

—————

IDNumber = 4 Name = Meowth, hp = 100 Status: alive

IDNumber = 7 Name = Gloom, hp = 100 Status: alive

 

 

Computer’s Deck

—————

IDNumber = 5 Name = BunnleBy, hp = 100 Status: alive

IDNumber = 2 Name = Froky, hp = 55 Status: alive

Select an attack (by number):

Attack 1 = Acid

Attack 2 = Swwet Scent

Attack 3 = Poison Powder

3

Gloom attacks Froky using Poison Powder

Begin Battle

Yes! Hit.

Gloom scores 45 using Poison Powder.

End Battle

player turn = false

 

 

 

 

 

 

 

 

 

 

Player’s Deck

—————

IDNumber = 4 Name = Meowth, hp = 100 Status: alive

IDNumber = 7 Name = Gloom, hp = 100 Status: alive

 

 

Computer’s Deck

—————

IDNumber = 5 Name = BunnleBy, hp = 100 Status: alive

IDNumber = 2 Name = Froky, hp = 10 Status: alive

Froky attacks Gloom using water drip

Begin Battle

Yes! Hit.

Froky scores 20 using water drip.

End Battle

 

 

 

 

 

 

 

 

 

 

Player’s Deck

—————

IDNumber = 4 Name = Meowth, hp = 100 Status: alive

IDNumber = 7 Name = Gloom, hp = 80 Status: alive

 

 

Computer’s Deck

—————

IDNumber = 5 Name = BunnleBy, hp = 100 Status: alive

IDNumber = 2 Name = Froky, hp = 10 Status: alive

Select an attack (by number):

Attack 1 = Acid

Attack 2 = Swwet Scent

Attack 3 = Poison Powder

3

Gloom attacks Froky using Poison Powder

Begin Battle

missed – Drat!!

End Battle

player turn = false

 

 

 

 

 

 

 

 

 

 

Player’s Deck

—————

IDNumber = 4 Name = Meowth, hp = 100 Status: alive

IDNumber = 7 Name = Gloom, hp = 80 Status: alive

 

 

Computer’s Deck

—————

IDNumber = 5 Name = BunnleBy, hp = 100 Status: alive

IDNumber = 2 Name = Froky, hp = 10 Status: alive

Froky attacks Gloom using quick attack

Begin Battle

missed – Drat!!

End Battle

 

 

 

 

 

 

 

 

 

 

Player’s Deck

—————

IDNumber = 4 Name = Meowth, hp = 100 Status: alive

IDNumber = 7 Name = Gloom, hp = 80 Status: alive

 

 

Computer’s Deck

—————

IDNumber = 5 Name = BunnleBy, hp = 100 Status: alive

IDNumber = 2 Name = Froky, hp = 10 Status: alive

Select an attack (by number):

Attack 1 = Acid

Attack 2 = Swwet Scent

Attack 3 = Poison Powder

2

Gloom attacks Froky using Swwet Scent

Begin Battle

Yes! Hit.

Gloom scores 15 using Swwet Scent.

Froky is dead.

<<<<<<<<<<<<<+++++++++>>>>>>>>>>>>>>>>>>>

End Battle

player turn = false

 

 

 

 

 

 

 

 

 

 

Player’s Deck

—————

IDNumber = 4 Name = Meowth, hp = 100 Status: alive

IDNumber = 7 Name = Gloom, hp = 80 Status: alive

 

 

Computer’s Deck

—————

IDNumber = 5 Name = BunnleBy, hp = 100 Status: alive

IDNumber = 2 Name = Froky, hp = -5 Status: dead

Froky attacks Gloom using water drip

Begin Battle

missed – Drat!!

End Battle

Popping 1 Pokemon, named Froky

Computer has advanced BunnleBy into attack position.

Player’s Deck

—————

IDNumber = 4 Name = Meowth, hp = 100 Status: alive

IDNumber = 7 Name = Gloom, hp = 80 Status: alive

 

 

 

 

Computer’s Deck

—————

IDNumber = 5 Name = BunnleBy, hp = 100 Status: alive

IDNumber = 2 Name = Froky, hp = -5 Status: dead

Select an attack (by number):

Attack 1 = Acid

Attack 2 = Swwet Scent

Attack 3 = Poison Powder

(I quit the program here)

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: