Permalink
Browse files

game_theory_jl: 0.4 compatibility

  • Loading branch information...
1 parent d6dca66 commit 1f74eb51f473765079c8c5a417e0e5d94cd032e2 @oyamad oyamad committed Nov 19, 2016
Showing with 4 additions and 3 deletions.
  1. +4 −3 game_theory_jl.ipynb
@@ -50,7 +50,8 @@
},
"outputs": [],
"source": [
- "using Games"
+ "using Games\n",
+ "using Compat # For compatibility for Julia v0.4"
]
},
{
@@ -681,7 +682,7 @@
"source": [
"immutable Cournot{N} end\n",
"\n",
- "function (::Type{Cournot{N}}){N,T<:Real}(a::Real, c::Real, q_grid::Vector{T})\n",
+ "@compat function (::Type{Cournot{N}}){N,T<:Real}(a::Real, c::Real, q_grid::Vector{T})\n",
" nums_actions = tuple([length(q_grid) for i in 1:N]...)::NTuple{N,Int}\n",
" S = promote_type(typeof(a), typeof(c), T)\n",
" payoff_array= Array{T}(nums_actions)\n",
@@ -867,7 +868,7 @@
{
"data": {
"text/plain": [
- "2"
+ "1"
]
},
"execution_count": 26,

0 comments on commit 1f74eb5

Please sign in to comment.