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
CREATE TABLE Departments | |
(did INTEGER NOT NULL UNIQUE, | |
departmentName CHAR(30) NOT NULL, | |
doctorId INTEGER, | |
numberOfBeds INTEGER NOT NULL, | |
PRIMARY KEY (did)); | |
CREATE TABLE Employees | |
(eid INTEGER NOT NULL UNIQUE, | |
did INTEGER NOT NULL, |
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
#!/bin/sh | |
if git-rev-parse --verify HEAD >/dev/null 2>&1 ; then | |
against=HEAD | |
else | |
# Initial commit: diff against an empty tree object | |
against=4b825dc642cb6eb9a060e54bf8d69288fbee4904 | |
fi | |
# Find files with trailing whitespace |
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
for i = 1, self.sellAmount do | |
playerItem, pageIndex, slotIndex = self.player.inventory:search(item) | |
if self.player.inventory.pages[pageIndex][slotIndex].quantity > 1 then | |
playerItem.quantity = playerItem.quantity - 1 | |
elseif self.player.inventory.pages[pageIndex][slotIndex].quantity == 1 then | |
self.player.inventory:removeItem(slotIndex, pageIndex) | |
end | |
end |
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
local Item = require 'items/item' | |
return{ | |
name = "note", | |
image = "note", | |
type = "consumable", | |
MAX_ITEMS = 1, | |
use = function( consumable, player ) | |
locl itemNode = require('items/consumables/note') | |
local item = Item.new(itemNode) |
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
function Climbable:release( player ) | |
local state = player.currently_held and 'wielding' or 'default' | |
player:setSpriteStates(state) | |
player.isClimbing = false | |
end |
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
update = function( dt, enemy, player, level ) | |
if enemy.dead then return end | |
local direction | |
if enemy.hp < 16 and math.abs(enemy.position.x - player.position.x) < 250 then | |
enemy.idletime = enemy.idletime + dt | |
if math.abs(enemy.position.x - player.position.x) < 2 then | |
--stay put | |
elseif enemy.position.x < player.position.x then | |
enemy.direction = 'right' |
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
package ai; | |
import mvc.Control; | |
import spaceracer.*; | |
public class StudentAIQuestion6 implements Control { | |
private final Radar myRadar; | |
private final Spaceship myShip; | |
private float desiredSpeed; | |
private float desiredYPos; |