Snippets Collections
<button class="btn btn--new">🔄 New game</button>


.btn {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    color: #444;
    background: none;
    border: none;
    font-family: inherit;
    font-size: 1.8rem;
    text-transform: uppercase;
    cursor: pointer;
    font-weight: 400;
    transition: all 0.2s;
    background-color: white;
    background-color: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    padding: 0.7rem 2.5rem;
    border-radius: 50rem;
    box-shadow: 0 1.75rem 3.5rem rgba(0, 0, 0, 0.1);
}

.btn:active {
    transform: translate(-50%, 3px);
    box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.15);
}
def cellCompete(states, days):
	for day in range(days):
    	newStates = states[:]

		for i in range(len(states)):
        	if i == 0:
            	if states[i+1] == 0:
                	states[i] = 0
				else:
                	states[i] = 1
            elif i == len(states) - 1:
            	if states[i-1] == 0:
                	states[i] = 0
				else:
                	states[i] = 1
            else:
            	if states[i-1] == states[i+1]:
                	newStates[i] = 0
				else:
                	newStates[i] = 1
		states = newStates[:]
	return states
star

Sat Jun 15 2024 22:56:13 GMT+0000 (Coordinated Universal Time)

#active #button #animation
star

Mon Feb 21 2022 19:08:36 GMT+0000 (Coordinated Universal Time)

#python #cells #houses #inactive #active #bruteforce

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension