Skip to content

Instantly share code, notes, and snippets.

@edgerunner
edgerunner / ellibir.md
Created November 14, 2012 16:03
örnekler

Ellibir oyunu

İki kişilik bir oyun. Amaç 51 puanı geçmeden en yüksek puanı almak

Kurallar

  • Oyunun başında her iki oyuncuya birer kart dağıtılır.
  • Her kartın değeri 1 ile 10 arasında rastgele bir sayıdır.
  • Puanı düşük olan oyuncuya kaç kart almak istediği sorulur. Cevap en az 1 olabilir. Oyuncunun istediği kadar kart, eline eklenir.
  • En son kart alan oyuncunun puanı rakibinin puanına eşitlenir veya geçerse kart alma sırası rakibe geçer. Puanı rakibinin altında kalır veya 51 puanı geçerse oyunu kaybeder.
class Oyuncular
attr_accessor :name,:score
end
evet = 1
hayır = 2
print "Oyuncu 1 ismin ne?"
oyuncu1=Oyuncular.new
oyuncu1.name=gets.chomp
@edgerunner
edgerunner / mount.js
Created December 21, 2018 01:09
Cypress command to mount react components
import { render } from "react-dom";
Cypress.Commands.add("mount", (component) => {
cy.get("body", { log: false }).then((body) => {
body[0].innerText="";
const container = document.createElement("div");
container.setAttribute("id", "cypress");
body[0].appendChild(container);
render(component, container);
return container;
Ironer&
Motor
reset -> Stopped
Stopped*
start -> Started
Started
stop -> Stopped
Forward*
curtain triggered -> Reverse
Reverse
@edgerunner
edgerunner / SketchSystems.spec
Last active April 19, 2019 12:58
Water intake*
Water intake*
level at setpoint -> No intake
level above max -> Drain
Mix water*
Fill both*
temperature above setpoint -> Fill cold
temperature below setpoint -> Fill hot
Fill cold
temperature at setpoint -> Fill both
Fill hot
@edgerunner
edgerunner / SketchSystems.spec
Last active July 7, 2021 10:42
Barn management
Barn management
Initial*
start drag -> Changing
Changing
move to possible -> Possible
move to impossible -> Impossible
move to same -> Same
release -> Initial
Same
Impossible
Washer &
Cycle
Locking door
# fire this on entry
lock -> Locking
locking complete -> Phase
Phase
pause phase -> Phase paused
Preparing
phase ready -> Washing
Analysis
Coming from?
from cow preview? -> Onion
from cowlist? -> Heatmaps
Heatmaps&
View
Empty
Maps
close all columns -> Empty
@edgerunner
edgerunner / SketchSystems.spec
Created April 17, 2019 13:43
Long Press Confirm Button &
Long Press Confirm Button &
Button
release -> Idle
Idle
press -> Pending
Pending
timer done -> Ready
move out -> Pending out
Pending out
move in -> Pending
@edgerunner
edgerunner / SketchSystems.spec
Last active April 23, 2019 13:27
SmartEvent
SmartEvent
pending
ActionButton
CONFIRM_EVENT -> smart-note-entry
smart-note-entry
UNFOCUS_SMART_NOTE -> pending
SmartNote
incomplete
ALL_REQUIRED_FIELDS_COMPLETE -> complete
complete