Skip to content
This repository has been archived by the owner on Aug 11, 2023. It is now read-only.

Commit

Permalink
add current_t kwarg for the (full) constructor (#86)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sid-Bhatia-0 authored Oct 13, 2020
1 parent 670b9e3 commit 6ee5216
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/implementations/environments.jl
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,8 @@ mutable struct MaxTimeoutEnv{E<:AbstractEnv} <: AbstractEnv
current_t::Int
end

MaxTimeoutEnv(env::E, max_t::Int; current_t::Int = 1) where E<:AbstractEnv = MaxTimeoutEnv(E, max_t, current_t)

function (env::MaxTimeoutEnv)(args...; kwargs...)
env.env(args...; kwargs...)
env.current_t = env.current_t + 1
Expand Down

0 comments on commit 6ee5216

Please sign in to comment.