Skip to content

Instantly share code, notes, and snippets.

@jkassemi
Created January 22, 2014 06:07
Show Gist options
  • Save jkassemi/8554125 to your computer and use it in GitHub Desktop.
Save jkassemi/8554125 to your computer and use it in GitHub Desktop.
Just messing around with some conceptualization of stuff I find myself randomly reading.
/*
The classification of contempts as direct and indirect is merely a semantic device for
differentiating contempts that can be adjudicated summarily from those that can be adjudicated
only after adequate notice and hearing. When a contempt occurs within the "immediate view and
presence of the court" the judge is fully informed of all facts necessary to adjudicate the guilt or
innocence of the alleged contemner. When, however, the court is not so informed of such facts,
notice and hearing are necessary to get them....
In stating that "The failure of an attorney, without valid excuse, to be present... constitutes...
a direct contempt"... the majority opinion itself implicitly concedes that petitioner's contempt, if
any, cannot be subject to summary punishment. The absence of a valid excuse is an
indispensable element of the contempt. The trial judge could not discover the nature of the
excuse or determine its validity without a hearing.
*/
type Case interface {
HoldInContempt(*Party)
Verdict() // nil none, plaintiff if plaintiff, defendent if defendent
Run()
}
type _Case struct {
Plaintiff Party
Defendent Party
Judge Party
State CaseState
}
type DirectContempt struct {
*_Case
}
type IndirectContempt struct {
*_Case
}
type CaseState int
const (
_ = iota
NonExistence State
Settlement
Discovery
Hearing
Judgement
Sentencing
Closed
)
func (party *Party) KnowsAllTheShitAboutParty(party *Party) bool {
// For this case we'll pretend we do
return true
}
func (party *Party) KnowsAllTheShitAboutCase(case *Case) bool {
if case.Present(case.Plaintiff) &&
case.Present(case.Defendent) &&
case.Present(case.Judge) {
true
}
}
func (case *Case) HoldInContempt(party *Party, situation *Situation) (case *Case){
if case.Judge.KnowsAllTheShitAboutSituation(situation) {
return &DirectContempt{&_Case{
Plaintiff: case.Judge,
Defendent: party,
}
} else {
return &IndirectContempt{&_Case{
Plaintiff: case.Judge,
Defendent: party,
}
}
go case.Run()
}
(case *Case) Hears (presenter *Party, argument *Argument) int {
if argument.Crap() {
return -1
} else if argument.Meh() {
return 0
} else {
return -1
}
}
func (case *Case) Run() {
case.Open()
while !case.PlaintiffDone() {
case.PlaintiffScore += case.Hears(case.Plaintiff, ARGUMENT)
case.DefendentScore += case.Hears(case.Defendent, ARGUMENT)
}
case.Judgement()
case.Close()
if case.Plaintiff.IsPissed() || case.Defendent.IsPissed() {
//case.Reopen()
}
}
func main(){
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment