Quantcast

Convert OvaleBestAction:Compute() to use a lookup table.

Author Johnny C. Lam <jlam88@gmail.com>
Author date 2013-03-23 21:38:20
Author local date 2013-03-23 21:38:20 +0000
Committer Johnny C. Lam <jlam88@gmail.com>
Committer date 2013-03-23 21:38:20
Committer local date 2013-03-23 21:38:20 +0000
Commit f9431a699a5a1da5446441d601ba7947082cadcb
Tree 730ebff7ed23cef9d87f4d9bc186c045ff35e322
Parent 647e99cadfa68cf42ed51a341ca10f6afd98588e
Convert OvaleBestAction:Compute() to use a lookup table.

This change converts the Compute() method of OvaleBestAction to use a
lookup table instead of cascading if-else statements for efficiency.  As a
side-effect, it is also easier to understand and maintain the code this
way.

Re-add node IDs to each node of the abstract syntax tree in OvaleCompile.
Node IDs are used in the debugging messages for OvaleBestAction.

git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@816 d5049fe3-3747-40f7-a4b5-f36d6801af5f