Skip to content

Commit

Permalink
added forgotten file.
Browse files Browse the repository at this point in the history
  • Loading branch information
rssh committed Mar 7, 2013
1 parent 694b16f commit 6abe966
Showing 1 changed file with 24 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package bargaining.agents

import bargaining._
import scala.math._


class Scrooge extends Agent {

override def name = "scrooge:"

def propose(agent: Agent, sum: Int): Division =
{
val x = (sum*0.9).toInt
Division(x, sum-x)
}

def accept(agent: Agent, d: Division): Boolean =
{
return d.forYou > 0
}



}

0 comments on commit 6abe966

Please sign in to comment.