This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const lightDungeon = ({ dungeon, colors }) => { | |
// initialize an empty light map, which is mutated in `paintLight` | |
let lightMap = gridFromDimensions(HEIGHT, WIDTH, undefined); | |
for (let row = 0; row < HEIGHT; row++) { | |
for (let col = 0; col < WIDTH; col++) { | |
// if a cell is a light source, calculate the light data | |
// it creates and store it in `lightMap` | |
if (dungeon[row][col].glowLight) { | |
lightMap = paintLight({ | |
lightSource: dungeon[row][col].glowLight, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class CourseStudentsJoin(models.Model): | |
"""Creates a mock of the previous many to many join.""" | |
class Meta: | |
db_table = u'course_course_students' | |
course = models.ForeignKey(Course) | |
student = models.ForeignKey(User) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('#email-form').on('submit', function(event){ | |
event.preventDefault(); | |
console.log("form submitted!") // sanity check | |
submit_email(); | |
}); |