Wednesday, May 13, 2009

Coding the IPL for E71

STATUTORY WARNING: The write-up below insists that you be blessed with Java know-how.

I decided to code a little cricket game for my E71, a la IPL. To begin with, I thought I'll start with designing my player classes. I've come up with the following classes:

public abstract class Player {

private Team team;
private String firstName;
private String lastName;
private boolean isRightHanded;
private String fieldingPosition;

// all players bat
public void bat() {
// ... implementation ...
}

// all players field
public void field() {
if(fieldingPosition.equals(FieldingPosition.WICKETKEEPER)
keepWickets();
else
field(fieldingPosition);
}
}

public interface Bowler {
// Given that each player bowls differently, action, guide, etc.
public void bowl();
}


All this is fine, until I decided we can add a few new characteristics. In which case, some players will need their own classes. Par example:

public class TurbanedMumbaiIndianOffSpinner extends Player implements Bowler {

public void slapPlayer(Player p) {
// ... implementation ...
p.isSlapped(this);
}

}

public class AppamLikeBowlers implements Bowler {

private boolean radarOn;

public AppamLikeBowlers {
radarOn = false;
}

public void cry() {
// ... implementation ...
}

public void isSlapped(Player slappingPlayer) {
cry();
}

}


Making some progress, I guess.

Saturday, May 9, 2009

Open letter to Sreesanth

Dear Mr. Appam C,

Let me first summarize your effort in the IPL 2009. Two matches (you are currently in your third), eight overs, eighty-one runs, and the one wicket of Hayden who decided to take pity on you after hammering you for three sixers. [Update: you fetched Gilly too, a few moments ago.] Unlike last IPL, where you contributed with slap-evoking-tears and other entertainment, the only entertainment that you've provided this year has been when your balls have been dispatched to eagerly waiting spectators standing outside the stadium. Last I heard there are twelve people who have nominated twelve different batsmen to hit the fly cam, but in a strange co-incidence, all twelve are unanimous in predictive agreement that the hit will be made off you.

There is also an unconfirmed claim that Preity Zinta announced a cash-prize for the one batsman who will straight-drive your balls right back into yours so that she has a legitimate reason for dropping you.

In such a shituation, you ought to focus on getting your deliveries right as opposed to commenting on Ms. Daisy Bopanna. While I am tempted to agree with your assessment of Angelina Jolie's face, Daisy Bopanna isn't struggling much as an actor as you are with your radar. Her balls don't land as half-volleys every now and then, and more importantly, don't get whacked.

If there's anyone who really *is* struggling right now, it's you.

Rameez Maharaja

First off, I'm glad to see Dhoni back into some kind of form. Especially that lofted shot over the bowler's head for six: sweet. Dhoni hardly moved, the bowler didn't move, the fieldsmen didn't move and the crowd, whatever little arrived to the venue, were shocked. The ones who moved the most, in that shot, were the cheerleaders.

Now, on to issues of importance. Rameez Raja is one amongst those folks who are plain lucky yours truly is NOT the President of India. If I were, I'd authorize the full-scale nuking of Mr. Raja, no-first-use policy be damned, for the trauma he inflicts on millions of Indians between 8pm and midnight IST.

Then again, as Truman says in Armageddon, "why waste a perfectly good bomb?"

The reason one would want to waste a nuclear warhead is because the aforementioned individual, who gives us a taste of his commentary noise every evening, is simply pathetic at it. I would rather have Rohit Barker there. I always thought Ranjit Fernando was the ultimate trench in live commentary, but this tournament, Rameez Raja has gone a step further down.

@bulletzer on twitter is one of those folks who deserves an award simply for accumulating clumsy commentary on the IPL. While Shastri's tracer-bullet kicked things off, I would be surprised to see Rameez Raja not miss the award. In fact, if there was an all-time list, he would figure right up there. Sure, you *can* call Ms. Bedi silly too, but Ms. Bedi didn't play Test cricket for her country - and she's got a better face, tan and pair of legs in that order - so I'm tempted to be biased.

I'm personally lost on what we can do to rid ourselves of the silly Rameez Raja commentary. It doesn't help that the IPL is sadly becoming boring. Unsure why, but it seems to have dragged on far too long and I can't wait for the semis to begin, or for monkey-business, the slaps, and the sorts. The quality of the batting and bowling has been good, but all-round cricket, with all those drop catches, has been average. The real entertainment that I've extracted from this IPL include the Fake IPL player, the Zoozoo ads, and the Hound of IPLville who streaked on the turf on Day 1.

Wednesday, May 6, 2009

Mayawati's potential erection

Yes, you read right. Not election, but *r* - e-r-e-c-t-i-o-n. Which is what you ought to expect if Mayawati becomes PM, going by her fetish for statues.

Not that I mind statues, but if you really do want to put one up, why not have statues of people who have united India: namely, Bhagat Singh, Chandrashekhar Azad, Mahatma Gandhi, Javed Miandad, MS Dhoni and Jade Goody?

It, of course, would be interesting of Mayawati decides to take a leaf out of the Western Ganga Dynasty's book and put up a statue a la Bahubali at Shravanabelgola:



Ergo, the term 'erection' would serve both purposes. Yet, Mayawati remains to be unpredictable. In the past she has pulled one down because she found it too small.