Skip to content

Instantly share code, notes, and snippets.

private int getRow(char[][] board)
{
int playerRow = 0;
System.out.println("Enter the row of your move "
+ "(needs to be >= 0 and <= " + board.length + ":");
try
{
playerRow = key.nextInt();
if(playerRow < 0 || playerRow > board.length)
{
public class Node<T> : IComparable<T>
{
public T Data { get; private set; }
public Node<T> Right { get; set; }
public Node<T> Left { get; set; }
public Node<T> Center { get; set; }
public Node(T data)
{
this.Data = data;
[TestClass]
public class TreeTest
{
/// <summary>
/// Inserts a bunch of numbers into a tree and prints it out in-order.
/// </summary>
[TestMethod]
public void TestTreeWithInts()
{
Tree<int> t = new Tree<int>();
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Birdfolio.Models
{
public class Bird
{
[Required, Key, DatabaseGenerated(DatabaseGeneratedOption.None)]
public int BirdId { get; set; }
public class Bird
{
[Required, Key, DatabaseGenerated(DatabaseGeneratedOption.None)]
public int BirdId { get; set; }
public int? ParentId { get; set; }
[ForeignKey("ParentId")]
public virtual Bird Parent { get; set; }
using BirdfolioSPA.Models;
using BirdfolioSPA.Providers;
using BirdfolioSPA.Results;
using Microsoft.AspNet.Identity;
using Microsoft.AspNet.Identity.EntityFramework;
using Microsoft.AspNet.Identity.Owin;
using Microsoft.Owin.Security;
using Microsoft.Owin.Security.Cookies;
using Microsoft.Owin.Security.OAuth;
using System;
DIRECTIONS
PRE-REQUISITES
LEARNING OBJECTIVES
The following lesson prompt is an excerpt from Prototypes and
Inheritance in JavaScript.