It is currently 19 Apr 2024, 08:01
   
Text Size

What card was discarded?

Post MTG Forge Related Programming Questions Here

Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins

Re: What card was discarded?

Postby mtgrares » 01 Aug 2009, 15:30

I was thinking last night, it seems to me the best thing to do would be to add a method to GameAction like discard(String player, String parseme). That way CardFactory can just use that method instead of jumping through loops.

Code: Select all
GameAction.discard(String player, String parseme)
{
  if(player is Computer)
    make the computer discard something
  else //human
    input = get appropriate input for human player
    AllZone.InputControl.setInput(input) 
}
Fixed: AllZone.InputControl.getInput(input) to AllZone.InputControl.setInput(input)
mtgrares
DEVELOPER
 
Posts: 1352
Joined: 08 Sep 2008, 22:10
Has thanked: 3 times
Been thanked: 12 times

Re: What card was discarded?

Postby Rob Cashwalker » 01 Aug 2009, 17:56

There ya go... that is the proper method. When I get a chance to jump back into the code I'll do just that.
The Force will be with you, Always.
User avatar
Rob Cashwalker
Programmer
 
Posts: 2167
Joined: 09 Sep 2008, 15:09
Location: New York
Has thanked: 5 times
Been thanked: 40 times

Previous

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 48 guests


Who is online

In total there are 48 users online :: 0 registered, 0 hidden and 48 guests (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: No registered users and 48 guests

Login Form