0% found this document useful (0 votes)
26 views64 pages

Beginning Unity Android Game Development: From Beginner To Pro 1st Edition Kishan Takoordyal

Uploaded by

amuedoedeki
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views64 pages

Beginning Unity Android Game Development: From Beginner To Pro 1st Edition Kishan Takoordyal

Uploaded by

amuedoedeki
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 64

Full download test bank at ebookmeta.

com

Beginning Unity Android Game Development: From


Beginner to Pro 1st Edition Kishan Takoordyal

For dowload this book click LINK or Button below

https://ebookmeta.com/product/beginning-unity-
android-game-development-from-beginner-to-pro-1st-
edition-kishan-takoordyal/

OR CLICK BUTTON

DOWLOAD EBOOK

Download More ebooks from https://ebookmeta.com


More products digital (pdf, epub, mobi) instant
download maybe you interests ...

Beginning 3D Game Assets Development Pipeline: Learn to


Integrate from Maya to Unity Nova Villanueva

https://ebookmeta.com/product/beginning-3d-game-assets-
development-pipeline-learn-to-integrate-from-maya-to-unity-nova-
villanueva/

Beginning MATLAB and Simulink: From Beginner to Pro,


2nd Edition Sulaymon Eshkabilov

https://ebookmeta.com/product/beginning-matlab-and-simulink-from-
beginner-to-pro-2nd-edition-sulaymon-eshkabilov/

Beginning Hibernate 6: Java Persistence from Beginner


to Pro 5th Edition Joseph B. Ottinger

https://ebookmeta.com/product/beginning-hibernate-6-java-
persistence-from-beginner-to-pro-5th-edition-joseph-b-ottinger/

Nginx From Beginner to Pro Rahul Soni

https://ebookmeta.com/product/nginx-from-beginner-to-pro-rahul-
soni/
Unity Development Cookbook: Real-Time Solutions from
Game Development to AI 2nd Edition Paris Buttfield-
Addison

https://ebookmeta.com/product/unity-development-cookbook-real-
time-solutions-from-game-development-to-ai-2nd-edition-paris-
buttfield-addison/

Fundamentals of Android App Development Android


Development for Beginners to Learn Android Technology
SQLite Firebase and Unity English Edition Sujit Kumar
Mishra
https://ebookmeta.com/product/fundamentals-of-android-app-
development-android-development-for-beginners-to-learn-android-
technology-sqlite-firebase-and-unity-english-edition-sujit-kumar-
mishra/

Introduction to Game Design Prototyping and Development


From Concept to Playable Game with Unity and C 3rd
Edition Jeremy Gibson Bond

https://ebookmeta.com/product/introduction-to-game-design-
prototyping-and-development-from-concept-to-playable-game-with-
unity-and-c-3rd-edition-jeremy-gibson-bond/

The Unity Shaders Bible: A linear explanation of


shaders from beginner to advanced. Improve your game
graphics with Unity and become a professional technical
artist. Jettelly Publishing
https://ebookmeta.com/product/the-unity-shaders-bible-a-linear-
explanation-of-shaders-from-beginner-to-advanced-improve-your-
game-graphics-with-unity-and-become-a-professional-technical-
artist-jettelly-publishing/

Beginning Unity Editor Scripting: Create and Publish


Your Game Tools 1st Edition Benny Kok

https://ebookmeta.com/product/beginning-unity-editor-scripting-
create-and-publish-your-game-tools-1st-edition-benny-kok/
Beginning Unity
Android Game
Development
From Beginner to Pro

Kishan Takoordyal

www.allitebooks.com
Beginning Unity
Android Game
Development
From Beginner to Pro

Kishan Takoordyal

www.allitebooks.com
Beginning Unity Android Game Development: From Beginner to Pro
Kishan Takoordyal
Eau Coulee, Mauritius

ISBN-13 (pbk): 978-1-4842-6001-2 ISBN-13 (electronic): 978-1-4842-6002-9


https://doi.org/10.1007/978-1-4842-6002-9

Copyright © 2020 by Kishan Takoordyal


This work is subject to copyright. All rights are reserved by the Publisher, whether the whole
or part of the material is concerned, specifically the rights of translation, reprinting, reuse of
illustrations, recitation, broadcasting, reproduction on microfilm or in any other physical
way, and transmission or information storage and retrieval, electronic adaptation, computer
software, or by similar or dissimilar methodology now known or hereafter developed.
Trademarked names, logos, and images may appear in this book. Rather than use a
trademark symbol with every occurrence of a trademarked name, logo, or image, we use
the names, logos, and images only in an editorial fashion and to the benefit of the
trademark owner, with no intention of infringement of the trademark.
The use in this publication of trade names, trademarks, service marks, and similar terms,
even if they are not identified as such, is not to be taken as an expression of opinion as to
whether or not they are subject to proprietary rights.
While the advice and information in this book are believed to be true and accurate at the
date of publication, neither the author nor the editors nor the publisher can accept any
legal responsibility for any errors or omissions that may be made. The publisher makes no
warranty, express or implied, with respect to the material contained herein.
Managing Director, Apress Media LLC: Welmoed Spahr
Acquisitions Editor: Spandana Chatterjee
Development Editor: Matthew Moodie
Coordinating Editor: Divya Modi
Cover designed by eStudioCalamar
Cover image designed by Pixabay
Distributed to the book trade worldwide by Springer Science+Business Media New York,
233 Spring Street, 6th Floor, New York, NY 10013. Phone 1-800-SPRINGER, fax (201)
348-4505, e-mail [email protected], or visit www.springeronline.com. Apress
Media, LLC is a California LLC and the sole member (owner) is Springer Science+Business
Media Finance Inc (SSBM Finance Inc). SSBM Finance Inc is a Delaware corporation.
For information on translations, please e-mail [email protected], or visit www.apress.
com/rights-permissions.
Apress titles may be purchased in bulk for academic, corporate, or promotional use. eBook
versions and licenses are also available for most titles. For more information, reference our
Print and eBook Bulk Sales web page at www.apress.com/bulk-sales.
Any source code or other supplementary material referenced by the author in this book is
available to readers on GitHub via the book’s product page, located at www.apress.com/
978-1-4842-6001-2. For more detailed information, please visit www.apress.com/
source-code.
Printed on acid-free paper

www.allitebooks.com
To my family and the high school friends who have
supported me from the start

www.allitebooks.com
Table of Contents
About the Author���������������������������������������������������������������������������������xi

About the Technical Reviewer�����������������������������������������������������������xiii


Introduction����������������������������������������������������������������������������������������xv

Chapter 1: Programming Concepts�������������������������������������������������������1


1.1 Variables, Constants, and Types����������������������������������������������������������������������4
1.1.1 Integer Data Type������������������������������������������������������������������������������������4
1.1.2 Float Data Type���������������������������������������������������������������������������������������4
1.1.3 Boolean Data Type����������������������������������������������������������������������������������4
1.1.4 String Data Type�������������������������������������������������������������������������������������5
1.1.5 Variables�������������������������������������������������������������������������������������������������5
1.1.6 Constants������������������������������������������������������������������������������������������������6
1.1.7 Comments����������������������������������������������������������������������������������������������6
1.2 Arrays��������������������������������������������������������������������������������������������������������������7
1.2.1 Declaring
 and Creating an Array�������������������������������������������������������������7
1.2.2 Setting,
 Fetching, and Modifying Values in an Array�������������������������������8
1.3 Arithmetic Operators���������������������������������������������������������������������������������������9
1.3.1 Addition, Subtraction, Multiplication, and Division���������������������������������9
1.3.2 Variables and Constants�����������������������������������������������������������������������10
1.3.3 Modulus������������������������������������������������������������������������������������������������10
1.3.4 Compound Assignment Operators��������������������������������������������������������11
1.3.5 Quick
 Increment and Decrement����������������������������������������������������������11

www.allitebooks.com
Table of Contents

1.3.6 Unary Operations����������������������������������������������������������������������������������11


1.3.7 Casting�������������������������������������������������������������������������������������������������12
1.4 Logical Operators������������������������������������������������������������������������������������������12
1.4.1 Simple Boolean Expressions����������������������������������������������������������������13
1.4.2 AND (&&)�����������������������������������������������������������������������������������������������14
1.4.3 OR (||)����������������������������������������������������������������������������������������������������14
1.4.4 NOT (!)���������������������������������������������������������������������������������������������������14
1.5 Selection�������������������������������������������������������������������������������������������������������14
1.5.1 if then else Control Structure���������������������������������������������������������������15
1.5.2 Case Control Structure�������������������������������������������������������������������������17
1.6 Iteration���������������������������������������������������������������������������������������������������������18
1.6.1 while Loop��������������������������������������������������������������������������������������������19
1.6.2 for Loop������������������������������������������������������������������������������������������������19
1.6.3 foreach Loop�����������������������������������������������������������������������������������������20
1.6.4 Continue and Break������������������������������������������������������������������������������21
1.7 Functions������������������������������������������������������������������������������������������������������22
1.7.1 Basics���������������������������������������������������������������������������������������������������23
1.7.2 Parameters�������������������������������������������������������������������������������������������23
1.7.3 Returning a Value���������������������������������������������������������������������������������24
1.7.4 global and local������������������������������������������������������������������������������������25
1.8 Coroutines�����������������������������������������������������������������������������������������������������26
1.8.1 Defining and Calling Coroutines�����������������������������������������������������������26
1.8.2 Using Seconds Instead of Frames��������������������������������������������������������27

Chapter 2: Introduction to Unity���������������������������������������������������������29


2.1 Creating a Unity Account�������������������������������������������������������������������������������29
2.2 Downloading Unity and Add-ons�������������������������������������������������������������������30
2.2.1 Unity Hub����������������������������������������������������������������������������������������������31
2.2.2 Creating an Empty Project��������������������������������������������������������������������33

vi
Table of Contents

2.3 Essential Windows����������������������������������������������������������������������������������������35


2.3.1 The Project Window������������������������������������������������������������������������������36
2.3.2 The Hierarchy Window��������������������������������������������������������������������������37
2.3.3 The Scene Window�������������������������������������������������������������������������������38
2.3.4 Game View��������������������������������������������������������������������������������������������46
2.3.5 The Inspector Window��������������������������������������������������������������������������50
2.3.6 The Unity Asset Store���������������������������������������������������������������������������52
2.3.7 The Console Window����������������������������������������������������������������������������55
2.3.8 B
 uild Settings���������������������������������������������������������������������������������������58

Chapter 3: GameObjects, Prefabs, Materials,


and Components���������������������������������������������������������������������������������59
3.1 GameObjects and Prefabs�����������������������������������������������������������������������������59
3.2 Components��������������������������������������������������������������������������������������������������62
3.2.1 Transform���������������������������������������������������������������������������������������������65
3.2.2 Camera�������������������������������������������������������������������������������������������������67
3.2.3 Lighting�������������������������������������������������������������������������������������������������72
3.2.4 Renderer�����������������������������������������������������������������������������������������������76
3.2.5 Collider�������������������������������������������������������������������������������������������������77
3.2.6 Rigidbody����������������������������������������������������������������������������������������������81
3.2.7 Audio Source and Listener��������������������������������������������������������������������82
3.2.8 Particle System������������������������������������������������������������������������������������84
3.2.9 Trail Renderer���������������������������������������������������������������������������������������93
3.3 Materials�������������������������������������������������������������������������������������������������������96
3.4 Tags and Layers��������������������������������������������������������������������������������������������98
3.5 Scripts���������������������������������������������������������������������������������������������������������100

vii
Table of Contents

Chapter 4: User Interface������������������������������������������������������������������105


4.1 Canvas��������������������������������������������������������������������������������������������������������106
4.1.1 Canvas Component�����������������������������������������������������������������������������107
4.1.2 Canvas Scaler�������������������������������������������������������������������������������������109
4.1.3 Graphic Raycaster������������������������������������������������������������������������������111
4.2 Rect Transform��������������������������������������������������������������������������������������������112
4.3 Text��������������������������������������������������������������������������������������������������������������114
4.4 Image����������������������������������������������������������������������������������������������������������116
4.5 Raw Image��������������������������������������������������������������������������������������������������118
4.6 Slider�����������������������������������������������������������������������������������������������������������119
4.7 Button���������������������������������������������������������������������������������������������������������122
4.8 Input Field���������������������������������������������������������������������������������������������������124
4.9 Toggle����������������������������������������������������������������������������������������������������������126
4.10 Drop-down������������������������������������������������������������������������������������������������128
4.11 Scrollbar����������������������������������������������������������������������������������������������������130
4.12 Scrollview�������������������������������������������������������������������������������������������������132
4.13 Panel���������������������������������������������������������������������������������������������������������134
4.14 EventSystem���������������������������������������������������������������������������������������������134
4.15 Introduction to Input Axes�������������������������������������������������������������������������136

Chapter 5: Building Our First Android Game: Sphere Shooter����������139


5.1 Render Pipelines�����������������������������������������������������������������������������������������139
5.1.1 Universal Render Pipeline (URP)���������������������������������������������������������140
5.2 The Environment�����������������������������������������������������������������������������������������145
5.3 Our Player (Tank)�����������������������������������������������������������������������������������������151
5.3.1 Making the Tank���������������������������������������������������������������������������������151
5.3.2 Setting Up Our Scene�������������������������������������������������������������������������157
5.3.3 Player Movement��������������������������������������������������������������������������������163

viii
Table of Contents

5.3.4 Camera Positioning����������������������������������������������������������������������������170


5.3.5 Making the Player Shoot Bullets��������������������������������������������������������171
5.4 Enemies������������������������������������������������������������������������������������������������������179
5.4.1 Making an Enemy�������������������������������������������������������������������������������179
5.4.2 Importing Another Asset from the Store���������������������������������������������183
5.4.3 Making Our Enemy Move and Explode�����������������������������������������������183

Chapter 6: Improving and Building Sphere Shooter�������������������������193


6.1 Spawning Enemies�������������������������������������������������������������������������������������193
6.2 Scoring��������������������������������������������������������������������������������������������������������196
6.3 Making Menus��������������������������������������������������������������������������������������������202
6.3.1 Coding Utilities Required��������������������������������������������������������������������202
6.3.2 Start Menu������������������������������������������������������������������������������������������205
6.3.3 Pause Menu����������������������������������������������������������������������������������������211
6.3.4 Game Over Menu��������������������������������������������������������������������������������216
6.4 Adding Health����������������������������������������������������������������������������������������������221
6.5 A New Enemy����������������������������������������������������������������������������������������������228
6.6 HealthBoxes������������������������������������������������������������������������������������������������233
6.6.1 Making the healthBox�������������������������������������������������������������������������233
6.6.2 Adding Health�������������������������������������������������������������������������������������234
6.6.3 Spawning healthBoxes Along the Map�����������������������������������������������235
6.7 Exporting the Game as an .apk file�������������������������������������������������������������239

Index�������������������������������������������������������������������������������������������������249

ix
About the Author
Kishan Takoordyal started at a young age
by learning programming with Python.
Since acquiring a greater interest in game
development, he has been developing games,
using the Unity game engine for more than
four years. He is also a Linux aficionado and
has worked on his own distribution. Currently,
he resides in his home country, Mauritius,
where he often participates in major technical
events and hackathons with Cyberstorm.mu,
while developing quality games and improving
his portfolio with new skills.

xi
About the Technical Reviewer
Simon Jackson is a longtime software
engineer and architect with many years of
Unity game development experience, as
well as the author of several Unity game
development books. He loves to create Unity
projects as well as lend a hand to help educate
others, whether via a blog, vlog, user group, or
major speaking event.
His primary focus at the moment is the
XRTK (Mixed Reality Toolkit) project. This is
aimed at building a cross-platform mixed reality framework to enable both
VR and AR developers to build efficient solutions in Unity and then build/
distribute them to as many platforms as possible.

xiii
Introduction
This book aims to help readers master the art of programming game apps
for Android, using the Unity3D game engine. It will help those wishing
to pursue a career, or hobbyists, understand basic concepts of game
development, using Unity. By the end of the book, readers will have gained
sufficient knowledge to confidently build an Android game.
The book starts by explaining simple programming concepts, to
familiarize beginners with the relevant jargon. Readers will then learn to
navigate the Unity interface and use basic tools (hand, move, rotate, scale,
rect). They will also learn to create basic 3D objects in the game, while
getting to know the purpose of several windows (Hierarchy, Inspector,
Scene, Game, Console, Project, Asset Store). The role of prefabs, Canvas
UI elements (such as Text, Button, Image, etc.), and several components
(transform, renderer, collider, rigidbody, etc.) will also be discussed.
In the last chapters, readers will learn to create a simple game for
Android, using the concepts studied in the previous chapters. Scripts will
have to be written to handle the behaviors of the player and enemies, as
well to handle other aspects of the game.
A lot of MonoBehavior structs (Vector3, Quaternion) and functions
(Awake, Start, Update, FixedUpdate, OnCollisionEnter, Coroutine)
also will be explained. Tips, such as switching to the universal rendering
pipeline, if targeting mobile platforms, will also be shared throughout the
book, to help improve in-game performance.
By the end of the book, the reader will have gained solid knowledge
for making basic Android games that can be upgraded later to make more
complex versions.

xv
CHAPTER 1

Programming
Concepts
Programming is all about taking a problem and defining a solution for it.
Every detail is elaborated to try and convey that solution to a computer.
For some, specific instructions are given to the computer system, to
perform tasks leading to the desired solution.
Thankfully, there are high-level programming languages to help us
write these solutions in a language closer to English than to 0s and 1s.
In exact terms, a programming language is a set of rules that provides a
means of instructing a computer what operations to perform.
Let’s consider an analogy. (Refer to Figure 1-1.) Suppose that we have
a couple of fruits and must make a salad out of them. The first step is to
analyze and define the problem. Specifically, input data (fruits) must be
identified and turned into expected output data (salad).
The second step is planning. One technique that programmers make
use of are flowcharts, which are a pictorial representation of a step-by-step
solution to a problem. They help us to focus on the program logic rather
than on the appropriate syntax of the programming language we’ll use.

© Kishan Takoordyal 2020 1


K. Takoordyal, Beginning Unity Android Game Development,
https://doi.org/10.1007/978-1-4842-6002-9_1
Chapter 1 Programming Concepts

The third step consists of actually coding the program. The logic in the
second step must now be converted into something that the computer can
understand. Various integrated development environments (IDEs) exist to
help programmers code in the programming language of their choice.
An IDE is just like a text editor but has several additional features to help
the development of a program, such as auto-completion or a debugger.
Auto-­completion is a feature whereby sentences are automatically
completed with keywords that the IDE expects next, while a debugger
helps to run the program and possibly find bugs.
The fourth and final step is to test the program. A few errors might be
present, and to detect them, different types of test data must be input, and
the output must be consistent with the expected result. Debugging refers
to detecting, locating, and correcting bugs. These bugs might be syntax or
logical ones, among others, the former being, for example, a misspelled
instruction that the computer doesn’t understand, and the latter being
something like telling the computer to repeat an operation but not telling it
how to stop repeating.

2
Chapter 1 Programming Concepts

Figure 1-1. Making a salad

3
Chapter 1 Programming Concepts

This chapter will guide you through many popular programming


concepts, but to keep things simple, a lot of content will be set aside.

Note You won’t be able to run the following code snippets yet,
but don’t worry. They are meant only to give you some basic theory
before we jump into Unity coding in subsequent chapters.

1.1 Variables, Constants, and Types


In programming, data can be of many different types. As we will be
working with the Unity game engine, snippets (parts) of code will be
expressed in C#. For this chapter, we will be considering only four types of
data: integer, float, boolean, and string.

1.1.1 Integer Data Type


Numerical values that are whole numbers (without a fractional part) can
be expressed in an integer form. Integer values can also be negative.

10, 2667, -50, 0

1.1.2 Float Data Type


Numerical values that have a fractional part can be expressed in a floating-­
point form. Float values can also be negative.

3.9874, 1.245, -112.245, 0.0932

1.1.3 Boolean Data Type


Boolean values have a value either of true or false.

4
Chapter 1 Programming Concepts

1.1.4 String Data Type


Sets of characters can be expressed in string form.

"Unity", "192.168.100.0", "The big brown fox"

1.1.5 Variables
Different operations can be performed on all sorts of data. In the long run,
it might be a good idea to make use of variables. A variable is a type of
special container to hold a specific kind of data. As an analogy, a variable
may be a wardrobe that serves to hold clothes and nothing else—not
kitchen utensils, for example. In C#, the classic way of declaring a variable
is as follows:

<variableType> <variableName> = <value>;

In C#, a variable of a particular data type cannot hold values of another


data type. To be clear, to declare and assign values to variables of the data
types mentioned, something similar to the following would have to be set up:

int myInteger = 10;


float myFloat = 3.9874f;
bool myBool = false;
string myString = "Unity";

Note that for floating-point variables, f must be appended at the end


of the float value, to make sure that it is interpreted as a float (rather than
the double data type). In the double data type, values are stored in 64 bits
(maximum 16 digits), which is not so useful for the type of values we will
be dealing with. Using a float data type also provides more performance
overall, because data is stored in 32 bits (7 digits).

5
Chapter 1 Programming Concepts

If variables are initialized without a value, for example, bool


condition, the default value of the data type they’re using will be assigned
to them, in the case of this example, false. For integers and floats, the
default values will be equal to 0 and 0.0f, respectively. For strings, this will
be "" (a blank and empty string).
If a variable already contains a value, and a new value is assigned to
it, the contents of the variable will be overwritten, and it will contain the
newly assigned value until the end of the program, unless another value is
assigned to it.

int pin = 1234;


pin = 4321;
// pin now holds a value of 4321.

Note that if a variable has already been declared, there’s no need to


reference it with its data type. This will be discussed more thoroughly in
Section 1.7.

1.1.6 Constants
Constants are just like variables, except that they can’t be modified after
declaration and will keep the value they were initialized with. The process
to declare a constant is similar to that to declare variables, except that the
const keyword must be placed before the data type field.

const <variableType> <variableName> = <value>;

1.1.7 Comments
A comment is a programmer-readable annotation or explanation in a
script that usually makes it easier for users to understand what some
part of a code does. Comments are generally ignored by the compiler/
interpreter. In C#, comments can be written either in a single-line or
multiline way.
6
Chapter 1 Programming Concepts

// This is a single-line comment.


/* This is a multiline comment.*/

1.2 Arrays
An array is a form of data storage structure similar to a variable, in the
sense that it is declared to hold a specific data type. Unlike variables,
however, arrays can hold multiple data values. When an array is created,
a predefined size is set for it. The array will thus hold the number of data
values equal to its size.
Data values found at indexes (positions) in the array may, just like
variables, be read, modified, or replaced by other data values of the same
type. The index of an array starts at 0 (the first data value), and the last
index will be equal to the size of the array minus one, because the first
index isn’t one.

1.2.1 Declaring and Creating an Array


If an array is declared without the part after the equal sign, it will just have
a size of zero. The size of the array can be modified later, but data values
stored at each index will be reset to the default value of the data type the
array uses.

<arrayType>[] <arrayName> = new <arrayType>[<size>];

// create an integer array of a size of 5 named firstArray


int[] firstArray = new int[5];
// create a string array with a size of 0 named secondArray
string[] secondArray;

7
Chapter 1 Programming Concepts

// creating a new string array with a size of 10 and assigning


it to secondArray
secondArray = new string[10];

Another way of declaring arrays could be to initialize them with values


at the start.

<arrayType>[] <arrayName> = {<value0>, <value1>};

int[] firstArray = {5, 10, 20, 35, 45};


string[] secondArray;

secondArray = {"abc", "def", "ghi"};

To get the length of an array, that is, how many values it can store, the
Length method can be called.

int[] firstArray = {5, 10, 20, 35, 45};


int arraySize = firstArray.Length; // 5

1.2.2 Setting, Fetching, and Modifying Values


in an Array
In this section, we are going to look at how to set and modify values at
indexes in an array.

<arrayName>[<index>] = <value>;
<variable> = <arrayName>[<index>];

In the following example, the value 13 will be stored in the third


position (index 2) of the integer array being used (firstArray). The value
13 is obtained by adding the data values being stored at index 0 (7) and
index 4 (6) where size - 1 refers to index 4.

8
Chapter 1 Programming Concepts

int[] firstArray;
int size = 5;

firstArray = new int[size];


firstArray[0] = 7;
firstArray[4] = 6;

firstArray[2] = firstArray[0] + firstArray[size - 1];

1.3 Arithmetic Operators


It is common to perform arithmetic operations in programming. The
basic arithmetic operations are addition, subtraction, multiplication, and
division. Numerical values can be manipulated using these operators.
This also applies to variables and constants that hold numerical values
(int, float). Arithmetic operators must have two operands, and multiples
of them can be chained for one equation. An operand is anything that is
used with an operator. For example, numbers in an addition statement
are operands, and the plus sign is an operator. An order of operations is
respected: operations in parentheses are evaluated first, followed by those
for division and multiplication and, finally, addition and subtraction.

1.3.1 Addition, Subtraction, Multiplication,


and Division
These can be used just as you learned in math class.

1 + 1; // 2
9 -6; // 3
4 * 2; // 8
60 / 12; // 5
6 * 2 + 3; // 15
5 * (3 - 1) + 1; // 11

9
Chapter 1 Programming Concepts

1.3.2 Variables and Constants


As previously stated, arithmetic operations can be done by using variables
or constants that hold numerical values.

int number = 1;

number + 1; // 2
number + 8 - 6; // 3

Results of arithmetic operations can also be stored in variables of a


numerical type.

int number = 2;

number = number * 2; // 4
number * 4; // 16

number = number + 56; // 60


number / 12; // 5

1.3.3 Modulus
This is another useful arithmetic operator. It returns the remainder of an
integer division. Just as in the preceding operators, it can also be used with
variables and constants.

11 % 4; // 3

10
Chapter 1 Programming Concepts

1.3.4 Compound Assignment Operators


There’s a shorthand way of assigning the value of an operation to a variable
that is involved in that operation.

Example Equivalent

sheep += 5; sheep = sheep + 5;


sheep -= 5; sheep = sheep - 5;
sheep *-= 5; sheep = sheep * 5;
sheep /= 5; sheep = sheep / 5;
sheep %= 5; sheep = sheep % 5;

1.3.5 Quick Increment and Decrement


Variables can be incremented or decremented by 1 rapidly.

int count = 5;

count++; // 6
count++; // 7
count--; // 6

1.3.6 Unary Operations


A unary operation is an operation with only one operand. As unary
operations have only one operand, they are evaluated before other
operations containing them. This usually applies to positive and
negative operators. For example, +8 + -2 and +2 - -3 are the equivalents
of 8 - 2 and 2 + 5, respectively.

11
Chapter 1 Programming Concepts

1.3.7 Casting
It may happen that when performing arithmetic operations, for instance,
an output of the undesired type is obtained. For example, if a programmer
has a variable declared as an integer in which they are about to store the
result of 5 * 1.61f, a float result will be obtained that can’t be stored in that
variable.
This is one of the situations in which casting comes in. Basically,
casting transforms a value of a particular data type into the same value,
but of a specified data type. Casting a float to an integer doesn’t round the
value. Only the integer part is returned.

int perfectInt;
float badFloat;

badFloat = 5 * 1.61f; // 7.55f

perfectInt = (int)badFloat; // 7

In the preceding example, we cast the value of the variable badFloat


to perfectInt. We could, however, have directly performed the arithmetic
operation and cast it in an integer in the perfectInt variable directly. For
arithmetic operations where a float result is expected, there is no need to cast
integers involved (whether in a variable or a raw value) to a float data type
Casting may also be inapplicable in some cases. For example, a
stringvalue comprised of letters can’t be cast to an integer or float.

1.4 Logical Operators


Logical operators in C# are symbols that are used to connect expressions,
such that the value of the compound expression produced depends on that
of the original expressions and on the meaning of the logical operator(s)
used.

12
Chapter 1 Programming Concepts

1.4.1 Simple Boolean Expressions


Boolean expressions always result in either a true or false. For example,
asking a question such as Is 5 greater than 2? would result in yes. In
programming, this would be written as 5 > 2, and the resulting Boolean
value returned would be true.

Symbol Interpretation

== Is equal to
!= Is not equal to
> Is greater than
< Is less than
>= Is greater or equal to
<= Is less than or equal to

4 > 5 // false
180 < 450 // true
60 >= 70 // false
567 <= 550 // false
330 != 80 // true

45 > 45 // false
40 < 40.1f // true
90 >= 90 // true
1 == 2 // false

"Cat" == "Dog" // false


"cat" == "Cat" // false
"Shoes" == "Shoes" // true
"Car" != "Plane" // true

13
Chapter 1 Programming Concepts

1.4.2 AND (&&)


The AND logical operator takes two operands. It returns a value of true if
the operands result in true.

(1 == 1) && (5 > 4) // true


(3 > 4) && (80 >= 79) && (50 > 40) // false

1.4.3 OR (||)


The OR logical operator takes two operands. It returns a value of true if at
least one of its operands results in true.

(3 < 4) || ( 255 == 256) // true


(4 > 5) || (40 < 50) || ("abc" == "def") // false

1.4.4 NOT (!)


The NOT logical operator takes only one operand. It turns a Boolean value
into its counterpart. That is, if the Boolean value of its operand is true, it
will return false.

!(1 == 2) // true
!((4 <= 8) && (6.1 >= 6)) // false

1.5 Selection
Normally, scripts are comprised of many lines of code. The sequence of
instructions is performed one after another. Sometimes, we wish to run
particular instructions based on specific conditions only. That’s where
selection comes in. By asking some sort of question, we can have the
computer system do something based on the answer. Control structures

14
Chapter 1 Programming Concepts

are what help us change this flow in programming. Every control structure
requires the indentation of code placed inside it. Indentation is really just
spaces or tabs.

1.5.1 if then else Control Structure


In this selection control structure, the condition of all the clauses specified
will be checked in the normal flow the code is running until the first
condition that results in true is found, or if all of them result in false. If
the condition of a clause results in true, its code block will run, and all the
other clauses will be skipped, because only one of the clauses specified can
be run.
Using a very simple if then else, some code can be performed only
if the specified condition results in true.

if (condition) {
// Do something
}
string apple = "fruit";
int numberOfFruits = 0;

if (apple == "fruit") {
numberOfFruits++;
}

The else keyword can also be specified to make another block of code
run, if the condition in the if clause results in false instead.

if (condition) {
// Do something
} else {
// Do something else instead
}

15
Chapter 1 Programming Concepts

string apple = "fruit";


int numberOfFruits = 0;
int numberOfVegetables = 0;

if (apple == "fruit") {
numberOfFruits++;
} else {
numberOfVegetables++;
}

Additionally, if and else clauses can be used together to make


multiple conditions in one block only. Note that the last else clause can be
omitted.

if (condition) {
// Do something
} else if (another condition) {
// Do something
} else {
// Do something else instead
}

string gender = "M";


int males = 0;
int females = 0;
int undefined = 0;

if (gender == "M") {
males++;
} else if (gender == "F") {
females++;
} else {
undefined++;
}

16
Chapter 1 Programming Concepts

Finally, if then else control structures can be “nested” into other if


then else control structures.

if (condition) {
if (condition) {
// Do something
}
}

string species = "human";


string furColor = "";
int brownFur = 0;
int blackFur = 0;

// != is interpreted as "is not equal to"


if (species != "human") {
if (furColor == "brown") {
brownFur++;
} else if (furColor == "black") {
blackFur++;
}
}

1.5.2 Case Control Structure


A case selection control structure works with a variable, and depending on
the value it contains, specific code can be run. All the case clauses will be
verified until one of them has a condition that results in true; otherwise,
the code in the last clause, default, will be run. If one of the case clauses
has a condition that results in true, the respective code block will be run,
and all the remaining clauses won’t be verified and, thus, skipped. The
break keyword is required in each clause. This form of control structure is
useful in the event that many checks have to be performed, as it provides a
more elegant solution than chaining many if-else statements.
17
Chapter 1 Programming Concepts

switch(variable) {
case value:
// Do something
break;
default:
// Do something else then
break;
}

string apple = "fruit";


int numberOfFruits = 0;
int numberOfVegetables = 0;
int numberOfExceptions = 0;

switch (apple) {
case "fruit":
numberOfFruits++;
break;
case "vegetable":
numberOfVegetables++;
break;
default:
numberOfExceptions++;
break;
}

1.6 Iteration
Very often, some parts of a script may have to be repeated more than once.
Instead of duplicating the code x times, to keep the program easier to read,
modify, and debug, and, in some cases, make algorithms significantly
more efficient, loop control structures may be used. Code placed between

18
Chapter 1 Programming Concepts

the curly braces of loop control structure clauses will keep running, based
on a predefined condition. If, however, a condition always remains true,
the loop will run infinitely and cause the program to crash.

1.6.1 while Loop


Essentially, code in a while loop keeps on repeating itself while some
condition is true.

while (condition) {
// Do something
}

In the following example, the while loop runs five times.

int number = 1;

while (number < 6) {


number++;
}

1.6.2 for Loop


A for loop is a bit more complex to write than a while loop. Unlike the
latter, it doesn’t have just a condition. Rather, it involves declaring a
variable, setting a condition, which, if doesn’t result in true, causes the
loop to stop running, and, finally, setting the amount by which the variable
will be incremented/decremented each time.

for (<declareVariable>; <condition>; <variableIncrement>)


{
// Do something
}

19
Chapter 1 Programming Concepts

For example, a for loop can be used to perform the sum of all the even
numbers from 2 to 10. Basically, a variable, i, is declared as an integer,
initially given the value 2, and each time the loops run, its value will be
incremented by 2 and added to the variable sum, until i has a value greater
than 10.

int evenSum = 0;

for (int i = 2; i <= 10; i += 2) {


evenSum += i;
}

1.6.3 foreach Loop


This is a slightly modified version of the for loop and is more common
to use with structures such as arrays. Instead of writing a for loop to loop
through all values of an array, a foreach loop can be written quicker,
which gets the work done. Unlike the regular for loop, in which the size of
the array has to be written for the condition part, that’s not necessary for a
foreach loop.

foreach (<dataType> <newVariableName> in <arrayName>) {


// Do something
}

For example, let’s imagine that we have an array of float values


and wish to get the sum of all the elements of that array. The foreach
loop will loop through every element of the array values and, each time,
automatically assign the current element to the temporary float variable
temp, which will itself be added and stored in the variable sum.

float[] values = {66.3f, 346.21f, 45.8f, 890.8f, 556.99f};


float sum = 0.0f;

20
Chapter 1 Programming Concepts

foreach (float temp in values) {


sum += temp;
}

For reference, here’s the equivalent in a normal for loop. Note that
values.Length returns a value of 5, but the loop cannot be equal to this,
because the last index of the array will be 4.

float[] values = {66.3f, 346.21f, 45.8f, 890.8f, 556.99f};


float sum = 0.0f;

for (int i = 0; i < values.Length; i++) {


float temp = values[i];
sum += temp;
}

1.6.4 Continue and Break


The continue keyword “tells” a loop to skip any code remaining and
directly jump to the next iteration of the loop. A simple example could be
iterating through an array of food and simply jumping to the next instance
of the iteration, to avoid incrementing an integer variable if the element
of the array at the current position isn’t a fruit.

string[] food = {"fruit", "human", "fruit", "vegetable", "shoes"};


int fruits;

foreach (string current in food) {


if (current != "fruit") {
continue;
}
fruits++;
}

21
Chapter 1 Programming Concepts

The break keyword instantly ends the execution of a loop and jumps
to the line of code just after and outside the loop. It can be used to end the
execution of a loop once a particular value has been found in an array, for
example, because it’s futile to continue checking the rest of the elements of
that array.

string[] alphabets = {"a", "b", "c", "d", "e", "f"};


string alphabetToSearchFor = "c";

int alphabetRealPosition = 0;

for (int i = 0; i < alphabets.Length; i++) {


if (alphabets[i] == alphabetToSearchFor) {
alphabetRealPosition = i + 1;
break;
}
}

1.7 Functions
You could have scripts with hundreds or thousands of lines of code. While
you can write everything in one continuous flow, wrapping code doing
one specific thing in one function makes the code appear more tidy, and
it’s easier to manage. In the preceding “Iteration” section (1.6), we learned
how to decrease code duplication by making loops. But what if some code
has to be run again multiple times but at different parts of the program?
That’s where functions come in.

22
Chapter 1 Programming Concepts

1.7.1 Basics
Functions contain code, and at desired parts in the script, they can be
“called” to perform the operation they were written to do.

void <functionName> () {
// Do something
}

Note that functions that do not return any value, that is, the script
doesn’t expect a value from them, have the type void. A void function
accomplishes its task and then returns control to the caller.
A simple function can be used to display something to the user. Of
course, the function won’t run by itself. That’s why in the main flow that
our code is running, we have to call it. The Debug.Log function will output
a logging message of the string we pass to it.

PrintHelloWorld();

void PrintHelloWorld() {
Debug.Log(“Hello World”);
}

1.7.2 Parameters
At times, we might also want to pass values to our functions, so that they
perform an operation with those, if, for example, we wish to reuse that
function for similar operations but with different values. The values that
we pass to functions are known as parameters, and they must be of the
same data type as the actual parameters.

void <functionName> (<parameterType> <parameterName>) {


// Do something
}

23
Chapter 1 Programming Concepts

Modifying the preceding example, we now want the function to print


the sum of three numbers passed as parameters. The values passed are
identified by a local name in the function, so that they can be referenced.
The result of the sum is 11 and will be outputted in a logging message.

int a = 5;
int b = 4;

PrintSum(a, b, 2);

void PrintSum(int first, int second, int third) {


Debug.Log(first + second + third);
}

1.7.3 Returning a Value


In the previous examples, our functions only performed an operation.
They didn’t in the true sense “return” a value. Functions not declared
as void can return a value that can be assigned to variables or used to
control the flow. For example, instead of making boolean variables to
hold a boolean value being returned by a function to be used in an if
else condition, we can directly call the function in the if clause. Note
that when a function returns a value, that value must be preceded by the
return keyword, and any code, if left in that function, won’t run.

<functionType> <functionName> (<parameterType> <parameterName>)


{
// Do something
return <value>;
}

Taking the preceding example again, let’s assign the return value of the
function to c this time.

int a = 5;

24
Chapter 1 Programming Concepts

int b = 4;
int c = 0;

c = Add3Numbers(a, b, 2);

int Add3Numbers(int first, int second, int third) {


return first + second + third;
}

Let’s consider another example, this time with a boolean value. The
function will return false if the variable eat doesn’t contain the value
fruit.

string food = "fruit";


int numberFruits = 0;

if (itsAFruit(food)) {
numberFruits++;
}

bool itsAFruit(string eat) {


if (eat == "fruit") {
return true;
}
return false;
}

1.7.4 global and local


Basically, variables declared outside all the functions of a script are known as
global, while those declared inside of functions are known as local. global
variables can be accessed from anywhere inside the script, while local
variables can only be accessed inside the function they are declared in.

25
Chapter 1 Programming Concepts

In the following example, a is a global variable, because it and its


value can be accessed, read, and modified anywhere in the script. Even
if a global variable is passed to a function as a parameter, the name by
which that function has referenced the parameter being passed is known
only to itself and, thus, both b and c are local parameters that can only be
accessed, read, and modified inside the function temporaryFunction().

int a = 100;

void temporaryFunction(string b) {
int c;
}

1.8 Coroutines
Coroutines are very similar to functions, except that when you call a
function, it runs to completion before returning. Any action that takes
place in a function isn’t something that happens over time, as code in a
function is run within a single frame update. While it is possible to use
loops and checks to achieve this, it is often more useful to use a coroutine.
Unlike functions, which must be manually called each time to be executed,
coroutines can be set to run automatically at specified delays. Return
values from a coroutine are compulsory and may not be assigned to any
variable or used directly.

1.8.1 Defining and Calling Coroutines


A coroutine can be called only once, and code within it will be run at a
number of frames defined by some specific keywords.

26
Chapter 1 Programming Concepts

StartCoroutine("<coroutineName>"); // or
StartCoroutine(<coroutineName>());
IEnumerator <coroutineName>(<parameters>) {
// Do something
yield return <returnValue>;
}

A coroutine always is defined as IEnumerator and must always have


that yield return <returnValue>; line. Any code after that yield
return <returnValue>; line will be run after the amount of frames
specified as the returnValue.
For example, to increase the value of the integer variable
numberFrames by one each time a frame is run in a game, the following code
may be used. yield return null; is the equivalent of yield return 1;
which, in our case, causes the last line of the coroutine to be ran once
per frame.

int numberFrames = 0;
StartCoroutine("CountFrames");
IEnumerator CountFrames() {
yield return null;
numberFrames++;
}

1.8.2 Using Seconds Instead of Frames


Instead of waiting for frames, coroutines can wait for a number of
seconds.

IEnumerator <coroutineName>(<parameters>) {
// Do something
yield return new WaitForSeconds(<numberOfSeconds>);
}

27
Chapter 1 Programming Concepts

A good example to demonstrate this could be checking for some


conditions at particular time intervals, rather than at each frame. The for
clause specified following runs infinitely. The if clause will run at intervals
of the value passed as parameter.

string weather = "rainy";


bool happy = false;
float numberSeconds = 0.5f;
StartCoroutine(CheckWeather(numberSeconds));
IEnumerator CheckWeather(float amount) {
for ( ; ; ) {
yield return new WaitForSeconds(amount);
if (weather == "sunny") {
happy = true;
} else {
happy = false;
}
}
}

28
Another random document with
no related content on Scribd:
Toisetkin nauroivat. Siihen loppui minun rohkeuteni; kiipesin
sänkyyn sisarieni viereen ja itkin.

"Otetaanko roskat vai kakaratko ensin, esimies?" kysyi Jussilan


isäntä, hän, jolla silloin oli sonninpitovuoro, kun alotin paimenessa
käyntini.

Puheenjohtaja yskäsi ja kävi tärkeän näköiseksi.

"Niin nähkääs, hyvät ystävät, minä en antanut kuuluttaa tästä


huutokaupasta kirkossa, levitin vaan sanaa kylässä, sillä jos jokainen
huutaa itselleen yhden kapineen ja joka viides yhden kakaran, niin
on kaikki loppuun myyty, sanoi Korkeelan Matti myydessään
paloviinaa Vehkalahden markkinoilla. Ja nyt se alkaa, sanoi
nimismies antaessaan eukolleen selkään joulu-aattona. Huudot on
suoritettava kolmen kuukauden perästä ja ne menevät
vaivaiskassaan, ja täällä ei tarjotakaan äyrittäin vaan viisi äyriä on
vähin huuto. Aletaan padanjalasta, sen sanotaan tuovan onnea
mukanaan."

Niin otettiin esille toinen toisensa perästä nuo vanhat kehnot


kapineet, jotka yhdessä olivat muodostaneet meidän kotimme.
Kaikessa viheliäisyydessäänkin olivat ne meille rakkaat, nuo
rikkoutuneet tuolit, tuo musta paistinpannu ja tuo horjuva pöytä. Kun
äidin virsikirja, jota hän oli lukenut niin ahkeraan kärsimisensä viime
aikoina, meni kahdestakymmenestäviidestä äyristä, painauduin minä
lujemmin kiinni sisariini, mutta vaikenin; mitäpä olisinkaan sille
voinut? Mutta hetki sen jälkeen tuli Koukkulan Martta, joka oli sen
ostanut, vanha vaimo, joka itse kuului kaikkein köyhimpiin, Hanna
sisareni luokse ja kuiskasi:
"Tuon saat sinä, tyttö. Äitisi sai sen ripille päästessään, kun
yhdessä seisoimme alttarin edessä."

Kun kaikki oli myyty, suuntautuivat katseet meihin raukkoihin, jotka


kyyristyneinä istuimme sängyssä.

"Pojan nalkki on jo iso ja vilkas, ja on jo oppinut tekemään jotakin


hyötyä. Hänet voi ottaa neljästäkymmenestä kruunusta vuodessa.
Hei, ukot, nyt saatte rahoja, eikä tarvitse antaa. Neljäkymmentä
kruunua pojasta! Sillä tavalla sitä huutokauppaa nyt pidetään sanoi
Kalajoen kirkkoväärtti kun juovuspäissä huusi oman turkkinsa."

"Minä otan sen viidestäkymmenestä", kuului ääni joukosta.

"Tiedä huutia, Länsikylän Lassi! Sinä et ymmärrä mitään


huutokaupasta, sanoi nimismies Levämäen Jannelle myydessään
hänen talonsa ryöstöhuutokaupalla. Poika on siivo ja nokkela, tekee
jo hyötyä, ei valehtele eikä varasta. Neljästäkymmenestä kruunusta
otan sen itsekin."

Kun kirjotan paperille nämät ensimäiset julkisen kiitoksen sanat,


mitä minusta on lausuttu, niin hymyily karkottaa sen usvapilven, mikä
vielä neljänkymmenen yhdeksän vuoden perästä tahtoo laskeutua
silmieni yli tuota päivää muistellessa. Tiedättekö miksi? Sentähden
kun vertaan niitä niihin julkisiin kiitossanoihin, mitkä sitä lähinnä
minusta lausuttiin. Se tapahtui valtuusmiesvaalissa kaksikymmentä
vuotta sitte. "Mies, jolla on monipuoliset tiedot, suuri työkyky ja vilkas
harrastus yleisiin asioihin", silloin sanottiin.

Molemmilla kerroilla teki reklaami vaikutuksensa. Valtuusmieheksi


minä tulin ja Pohjosen Jaska osti minut kolmestakymmenestä
kahdesta kruunusta kuudestakymmenestä äyristä.
Sitte huudettiin Hanna esiin. Häntäkin huutokaupan pitäjä kehui
kaikin tavoin. Kartata villoja ja tehdä puolia kankaan kutojalle hän jo
osasi. Luku oli hänelle käsittämättömän helppoa, niin että hän
piankin kävisi läpi tuon viheliäisen kansakoulun, herrojen keksinnön,
jonka kansa syntiensä tähden oli saanut niskoilleen.

"Nouseppas pystyyn, tyttö, jotta miehet saavat nähdä, kuinka


tukevaruumiinen sinä olet. Pientä karjaa hoitamaan ja porsaita
paimentamaan hän jo ensi kesänä kelpaa. Hänet sinä voit ottaa
viidestäkymmenestä, Länsikylän Lassi; sillä kalliimmaksi hän joka
tapauksessa tulee kuin poika."

"Kuusikymmentä viisi kruunua on tarjottu", kuului ääni ovensuusta.

"Niin kalliita ryökkinöitä ei täällä maalla ruukata, Penttilä. Se voi


olla sopiva hinta teaatteritytöistä ja tanssimamselleista, joita sanoit
nähneesi Tukholmassa. Mökkiläisen tyttö saa toki mennä
halvemmasta. Sanoitko sinä viiskymmentäviisi, Antti? Hitto vieköön,
jos annamme enemmän kuin viisikymmentä. Tuo saakelin Hakalan
Juha aivan vie meidät vararikkoon kakarajoukollansa. Lyödäänkö
tasan viisikymmentä, Antti?"

"Lyö jos uskallat", sanoi vuohi akalle.

"No onneksi olkoon, Antti! Kuluta terveydellä. Nyt sinä ensin voit
pitää häntä aputyttönä kuusi vuotta, kunnes hän on lukenut edes, ja
ansaita hyvät rahat hänestä, ja sitte saat siitä oikein kotona
kasvaneen palkkapiian. Niin, niin, Antti, sinä olet aina osannut oikein
pelata naisväen kanssa."

Joka meidän rahvastamme tuntee, hän tietää, ettei tuossa


haavoittavassa ja sydämettömässä puheessa, tuossa
säälimättömässä orpojen myymisessä ollenkaan ole sitä julmuutta ja
halpamaisuutta, mitä kansan elämään ja ajatuskantaan
perehtymätön helposti voisi luulla siinä olevan. Joku tuolla tavoin
"myyty" lapsi joutui huonon kohtelun alaiseksi, mutta hänen tilansa
olisi voinut tulla yhtä huonoksi, vaikkapa "majoittamisen" muoto
olisikin ollut vähemmän loukkaava. En tahdo puolustaa sitä, mitä ei
puolustaa voi, mutta en tahdo tehdä asiaa pahemmaksi kuin se oli,
ja ketään meistä sisaruksista ainakaan ei tahallisella julmuudella
piinattu. Saimme tietystikin huonoimman palan vadista,
repaleisimmat vaateryysyt, ja meidän oli heikoin voimin tekeminen
raskasta työtä, mutta talonpojan omat lapset eivät olleet paljoakaan
paremmassa asemassa.

Hanna veti pääliinan silmilleen ja meni istumaan oven pieleen; oli


kuin olisi hän vaistomaisesti tuntenut, että sänky ja kotoinen lämpö
vanhempien kodissa ei enää kuulunut hänelle.

Jos otetaan vanha Martta pois luvusta, olen varma, ettei yksikään
näistä isistä ja äideistä vielä tähän asti ollut tuntenut sydämessään
mitään ahdistusta tämän surullisen toimituksen kestäessä. Mutta kun
naapurinvaimo nosti pikku Emman lattialle ja sanoi. "Nyt on sinun
vuorosi", syntyi yhtäkkiä merkillinen hiljaisuus tuvassa.

Hän oli tuskin kolmea vuotta täyttänyt ja tavattoman kaunis lapsi.


Kullankeltaiset runsaat kiharat reunustivat kasvoja, jotka kaiken
köyhyydenkin keskellä olivat tulleet täyteläisiksi ja ruusuisiksi, ja
suuret sinisilmät loistivat kysyvinä ja ihmettelevinä, kauniina,
jollaisiksi kuvittelemme enkelien silmiä.

Jussilan isäntä rykäsi, sylkiisi uunin nurkkaan ja huomautti hiljaa:

"Koreapa on, pikku raukka."


Ja esimies pani huomaamattansa pois vasaran, jota hän tähän
asti oli käyttänyt huutokauppanuijana ja sanoi tavallisella keskustelu-
äänellä:

"Hän on nuorin ja vaivaloisin hoitaa, ja seitsemänkymmentä viisi


kruunua olisi sopuhinta, mutta eihän sitä tiedä, mihin omatkin lapset
vielä joutuvat, ja minä otan tytön kuudestakymmenestä. Tahtooko
joku mennä vielä alemmas?"

Sitä ei kukaan tahtonut.

Pikku Emma! Kyllä oli leipä karkeaa ja vuode kova ja hame ohut
"esimiehen" luona, mutta sinä viihdyit siellä hyvin, kasvoit solakaksi
ja vahvaksi, kuin nuori, valkonen solkikoivu haassa, ja sinä tulit
iloiseksi kuin leivonen ja kauniiksi kuin aurinkoinen toukokuun päivä.
Seuraavan kerran kun sinut myytiin, kävi huonommin, sillä ostajan
hienon takin alla sykki huonompi sydän kuin "esimiehen" karkean
sarkatakin alla. Ja kun sinua ajattelen, en tahdo muistaa tuoreessa,
täyteläisessä kukoistuksessasi, joka tuli turmioksesi, enkä kalpeassa
kurjuudessasi kun tulit Nils veljen luo kuolemaan. En, tahdon
muistaa sinua kolmivuotiaana, suloisena palleroisena, joka
katseellasi voit pehmentää satoja sydämiä, juuri sellaisena kuin olit,
kun sinut myytiin kuudestakymmenestä kruunusta…

Oli kuin olisi väkijoukko tuntenut helpotuksen ja vapautuksen


tunteen sydämessään. Esimies muutti paikkaa ja sanoi:

"Ja nyt, hyvät ystävät, on pidot lopussa, sanoi Jokelan Taneli


tanssiessaan polkkaa navetan lattialla."

"Oletko hullu, esimies? Täällähän on yksi poika vielä", sanoi


Pohjosen
Jaska.

"Kas perhanaa! Missä se on sitte?"

Ruvettiin etsimään Johannesta. Lopulta hän itkevänä ja


vastustelevana vedettiin esiin puuliiteristä. Hän teki mitä kiukkuisinta
vastarintaa ja hänen ilmeinen "ällipäisyytensä" teki hänet kylläkin
muutaman kruunun kalliimmaksi kuin mitä olisi tarvittu, jos hän olisi
pysynyt tyynenä kuten me muut. Nyt hän, huolimatta seitsemästä
ikävuodestaan tuli yhtä kalliiksi kuin Emma. Ruotusotilas Tapper tuli
hänen omistajaksensa.

"Sanokaa nyt hyvästi toisillenne!" kehotti esimies.

Minä menin lieden luo, missä siskot seisoivat, ja ojensin käteni


ensin Hannalle, sitte Johannekselle. Kun Emman vuoro tuli,
puhkesivat kyynelet taas esiin.

Ukot kääntyivät poispäin ja tuli taas niin ihmeellisen hiljaista


tuvassa. "Vapauttavan sanan" tarpeen tunsi kyllä kukin. Viimein
sanoi Länsikylän Lassi:

"Mäkitupalaisilla ei pitäisi koskaan olla oikeutta saattaa maailmaan


tuollaista hemmetin suurta lapsijoukkoa."

Tämä tervejärkinen kansantaloudellinen mietelmä ei miellyttänyt


vanhaa Marttaa, häntä, joka antoi Hannalle äidin virsikirjan. Jo
ovella, kotiinlähdössä, kääntyi hän ympäri ja sanoi:

"Pidä suusi kiinni, Lassi, äläkä sekaannu meidän Herramme


tehtäviin!"
Pohjosen Jaska oli, paitsi minua, ostanut padanjalat, vasaran ja
ämpärin. Vasaran pisti hän taskuunsa, pani padanjalat ämpäriin ja
antoi sen minun kannettavakseni. "Tule nyt, poika!"

Kun olimme tulleet mäen alle, käännyin katsomaan taakseni.


Useimmat ihmiset olivat jo kadonneet mökin pihalta; ovella seisoi
"esimies" ja pani par'aikaa esilukkoa oveen.

Kuinka näyttikään tupa vanhalta ja harmaalta ja matalalta ja


rumalta ja pieneltä!

Mutta niin pieni kuin se olikin, oli se kuitenkin antanut suojaa ja


kodin kuudelle sydämelle, jotka rakastivat toisiaan, vaikka huulet
eivät sitä koskaan sanoneet; oli nähnyt sisällään suuren kärsimisen
ja surun, kokonaisen pikkumaailman, jolla kaikessa halpuudessaan
ja köyhyydessään kuitenkin oli oma erityinen leimansa.

Oliko siinä kerran myöskin ilo ja elämän toivo asunut?

Ehkä. Mäkitupalainenkaan tuskin ajattelee, nuoren vaimonsa


kanssa muuttaessaan matalan katon alle, kuolla puutteeseen, ja että
hänen lapsensa joutuvat huutokaupalla myytäviksi.

Kun Pohjosen Jaska tuli kotiin, piti hän seuraavan puheen:

"Tässä on vasara sen sijaan, jonka tyttö pudotti kaivoon, ja


pannunjalat ja ämpäri, jossa sopii kantaa sikaruokaa. Ja sitte sain
minä sieltä pojan, joka yöt voi maata tuvan laskettavassa
likavesisaavin vieressä."

Niin että nyt virkaveljeni terveydenhoitolautakunnassa, jonka


varapuheenjohtaja olen, voivat mahdollisesti ymmärtää, miksi minä
kesäiseen aikaan niin erityisen tarkasti pidän silmällä talojen
likavesisaaveja.
III.

Kuinka minusta neljätoistavuotiaana tuli "kauppamatkustaja."

Kykyni mukaan, joka hyvin nopeasti kasvoi alituisessa


harjotuksessa ja kovassa karaistuksessa, sain minä nyt ottaa osaa
melkein kaikkiin maanviljelystöihin. Aura ja viikate jätettiin käsiini
tosin vasta viimeisenä vuotena niistä kolmesta, mitkä vietin Jaska
Pohjosen luona; mutta heti minä hyvin tarkkaan tutustuin lataan,
äkeeseen, kirveeseen, haravaan, vesuriin, lapioon, tadikkoon,
turvenuijaan y.m. työkaluihin.

Kuulin varsin hyvin kun Jaska talvi-aamuisin puoli kahden aikaan


alkoi käydä tassutella tuvan lattialla, yskien ja syljeskellen vaatteita
ylle heittäessään mennäkseen riihelle puimaan. Mutta minun heikot
jäseneni olivat arat ja särkivät vielä edellisen päivän työstä, ja kun
ojensin käteni saavia, ensimäistä lämpömittariani päin, oli siinä usein
jääkuori. Tiesin hyvin välttämättömin kohtaloni, mutta en koskaan
noussut, ennenkuin isäntä oli raottanut ovea ja lausunut
peruuttamattoman käskynsä:

"Pystyyn, poika!"
Tämä varstalla puinti kello kahdesta yöllä aina hämäriin asti
iltapäivällä oli yleinen tapa talonpoikaisoloissa 1840-luvulla ja
jälkeenkin. Ne puimakoneet, mitä silloin löytyi, olivat liian kalliita
talonpojille ja liian suuriakin heidän pienissä tiloissaan. Puhdepuinti
oli niin muodoin välttämätön, jos mieli saada kaikki vilja puiduksi
ennen joulua, mikä oli kunnian-asia.

Siellä seisoimme nyt Jaska ja minä 14 tunnin ajan, aamiais- ja


päivällisajaksi vain hiukan keskeyttäen. Kova pakkanen ei minulle
mitään tehnyt, sillä kyllä minä lämpimänä aina pysyin. Kun pienet
kädet alkoivat puutua tai kun olin kaatumaisillani ja nukkumaisillani
siinä seisoissani, tai kun käsivarret särkivät niin että olin vähällä
huutaa, silloin osasi isäntäni jollakin ytimekkäällä sanalla minua
virkistää: "Lyö niin että kuuluu, poika!" — "Elä pelkää, että siellä
olkien joukossa on mitään silmälaseja, lyö vaan niin että rätisee!" —
— "Seisot juuri kun leikkisit jonkun kissanpojan kanssa!" — "Elä
nuku, poika!" Iltasin, kun tulimme tupaan, kiipesi Jaska piankin
sänkyynsä, josta äänekäs kuorsaaminen pian ilmoitti hänen tekevän
parastaan kootakseen voimia huomispäivän ponnistuksiin. Mutta
minä sain vielä toimittaa askareita navetassa, kuoria perunoita,
kartata villoja, olla lapsenpiikana y.m., mitä emäntä vaan voi keksiä,
kunnes kello tuli kahdeksan, jolloin syötiin ja mentiin levolle.

Hauskempaa oli metsässä, missä Jaska kaasi puita ja minä kuorin


ne. Parempi oli keväisin pelloilla äkeen perässä, ja kesäisin niityillä,
missä joki juoksi aivan talon maiden läpi, linnut lauloivat ja suorsat -
leikkivät vedessä. Mutta kovaa oli työ, lepo riittämätön silloinkin ja
ravinto mahdollisimman huono.

Siten kului kolme vuotta, kunnes olin "lukenut itseni edes", mikä
tapahtui jo samana keväänä kun täytin neljätoista vuotta. Seisoin
alinna käytävällä, ylläni liinatakki, jota Pohjosen emäntä parhaansa
mukaan oli koettanut värjätä mustaksi, yritys, joka menestyi vain
osittain; siitä tuli mustanruskea, mustempia ja vaaleampia täpliä
vierekkäin aivan kuin pantterin nahkassa. Heillä ei ollut varaa antaa
minulle parempaa; viimeiseksi vuodeksi oli Jaska huutanut minut
vain viidestätoista kruunusta. Arveltiin, että minä jo aloin ansaita
elatukseni, ja sen minä todella uskon itsekin.

Mutta Vapahtajan katse alttaritaululta oli yhtä lempeä pienelle


ruotulaiselle kuin lautamiehen Kustaallekin, joka seisoi ensimäisenä.
Jos taas salaa heitimme katseen penkkiriveihin, oli siellä suuri ero.
Melkein kaikilla lapsilla oli siellä vanhemmat tai sukulaisia, jotka
rakkain katsein seurasivat jokaista heidän liikettään ja hymyilivät
tyytyväisyydestä kun vastaukset sattuivat jotakuinkin oikein.

Minulla ei ollut ketään.

Niin ainakin luulin. Mutta kun lupaukset oli annettu, ja kukin


nuorista kirkonmäellä haki omaistensa seuran, saaden osansa
kirkkoeväistä, ja kun minä seisoin yksinäni ja alakuloisena vilkasta
elämää ympärilläni katsellen, sukelsi äkkiä pieni käsi käteeni ja kaino
ääni kuiskasi:

"Pyysin emännältä lupaa saada tulla sinua katsomaan tänään, ja


hän antoi minulle nämä tuliaisiksi."

"Tule, pikku Nisse!"

Ja niin vei Hanna sisko minut lukkarin puuliiterin taakse ja otti


pienestä likaisesta nenäliinasta esille harmahtavan sokuripalasen ja
sangen kovan vesirinkelin.
Ylpeys loisti pikku sisaren silmistä hänen näin sanoessaan, ja
hänellä oli syytäkin siihen, niin iloiseksi oli hän tehnyt minut. Ei jäänyt
pieni ruotulais Nissekään aivan osattomaksi rakkaudesta ja
rinkeleistä tänä tärkeänä päivänä.

Hanna katseli minua vakavasti ja viisaan näköisenä minun


herkutellessani hänen tuomisillaan. Hänellä nähtävästi oli jotakin
mielessä. Lopulta se tuli esiin:

"Nisse, tiedätkö, missä äiti ja isä lepäävät?"

Tunsin piston sydämessäni. Tuota en ollut koskaan ajatellut.


Avuttomana harhaili katseeni hoitamattoman ruohopeitteisen
hautausmaan osan yli, mihin köyhät haudattiin.

"Jospa uskaltaisin kysyä joltakin", arveli Hanna.

Tunsin itseni niin pieneksi, köyhäksi ja huonoksi, että vaikka


suuresti kaipasinkin hetkeksi saada painaa pienet kasvoni ruohoon
isän ja äidin haudalla, ei kuitenkaan tehnyt mieleni kääntyä
kysymyksellä kenenkään puoleen. Otin kuitenkin pari askelta talleja
päin.

"Ei, anna olla, voisivat vaan tiuskaista meille", sanoi Hanna ja


pidätti minua takin liepeestä.

Tämän päivän, Helatuorstain, jälkeen alkoi elämä Pohjoistalossa


taas kulkea entistä yksitoikkoista rataansa; tähän asti olivat
pappilassa käynnit sitä hiukan vilkastuttaneet.

En tuntenut mitään kaunaa Jaskaa ja hänen vaimoansa kohtaan,


en kovan työn, enkä huonon ruuankaan takia, en siitä, että toisinaan
antoivat minulle selkään enkä siitä, että panivat minun nukkumaan
likavesisaavin viereen. Mutta eräänä päivänä kesällä kun meillä
päivälliseksi oli ollut pieni sillinpala ja hyvin huonoa perunakeittoa,
lähetettiin minut hakaan hakemaan hevosta heinänkorjuuseen.
Jaskan piti sill'aikaa "laittaa heinähäkit kuntoon". Pläsi sattui
olemaan aivan veräjän suulla, ja kymmenen minuutin perästä minä
taas jo avasin tuvan oven ja ilmoitin:

"Pläsi on jo pihalla, ja…"

Sanat tarttuivat kurkkuuni. Siellä istuivat Jaska ja emäntä ja kaikki


lapset ja ajoivat sisäänsä vehnäpuuroa ja maitoa. Niiden muutamien
vaivasten lusikallisten vuoksi, mitkä olisivat tulleet huutopojan
osaksi, piti nämä pienet kemut pidettämän salassa häneltä!
Änkyttäen ja pelästyen omaa rohkeuttani sanoin:

"Herra Jumala, onko jo illallisaika?"

Emäntä veti huivin silmilleen ja katseli alas maitovatiin.

"Satuin löytämään tämän pienen maitotilkan kaapista. Ota


lusikkasi, poika!"

Vähäpätöisimmätkin tapahtumat tulivat suuriksi käännekohdiksi


Pohjoistalon yksitoikkoisessa elämässä. Maantie kulki aivan talon
vieritse, ja herrasvaunujen ohi ajaminen antoi keskustelun aihetta
koko päiväksi. Ja kun oli markkinat kauppalassa puolentoista
penikulman päässä, laitti Jaska aina niin, että olimme työssä tien
vieressä niin että hän sai nähdä kaikki ohi vietävät elukat ja jutella
jonkun sanan niiden omistajien kanssa. Viinaa ei ollut markkinoilla
saatavissa, lukuunottamatta sitä vähää, minkä pari kahvieukkoa
kahvikupeissaan saattoivat tarjota siltavoudin selän takana, ja sen
vuoksi oli useimmilla lekkerit itsellä mukana. Jos joku oikein vanha
hyvä tuttu sattui ohi kulkemaan, niin otti hän pienen naukun yhdessä
Jaskan kanssa. Väliin ei yksi naukku riittänytkään, ja silloin isäntäni
maailmankatsomus muuttui paljon valoisammaksi. Sellaisessa
juhlallisessa tilaisuudessa kertoi hän kerran, että isäni jossakin
huutokaupassa oli pelastanut hänet selkäsaunasta, alkoi itkeä kauan
pidätetyn kiitollisuuden kyyneleitä ja antoi minulle kaksikymmentä
äyriä puhdasta rahaa, ainoat kolmen vuoden aikana.

Mutta kaikkein juhlallisinta oli niinä kolmena neljänä kertana


vuodessa kun matkakauppias tuli. Maakauppa oli silloin vielä
kapalossaan, meidän pitäjässämme ei ollut ainoatakaan avointa
kauppapuotia; kaikki, mitä emäntä ja piiat tiesivät maailman
komeudesta ja ylellisyydestä, supistui siihen, mitä he olivat nähneet
Lassi Anderssonin käynneillä. Ja Lassi Andersson oli juuri sama
kiertävä liikemies, joka kerran oli saanut osakseen minun ikuisen
kiitollisuuteni runsaasti palkitsemalla minun vaivani
viisikymmenäyrisellä.

Harvoin tuli kysymykseen, että emäntä olisi ostanut jotakin; piika


sitä ei tehnyt koskaan. Mutta Pohjoistalossa sopi kauppa-Lassin
hyvin levätä yö, väliinpä päiväkin, ja silloin tehtiin vuode
porstuanperäkamariin ja parasta, mitä talo voi tarjota, tuotiin esiin
hänen kestitsemisekseen. Eikä Poltekaan tallissa voinut huonommin.
Ottaa maksua sellaisesta vieraanvaraisuudesta pidettiin siihen
aikaan talonpoikaistalossa häpeänä, mutta palkitsemattakaan se ei
saanut jäädä, ja niin sai emäntä joka kerta pieniä lahjoja, nenäliinoja,
kampoja, saippuoita, sormustimia, rintasokeria ja muuta sellaista,
väliin loistavan korean päähuivinkin, puhumattakaan siitä että
kauppa-Lassi toimitti taloon niin paljon "rotansokeria" (arsenikkia)
kuin vuoden mittaan tarvittiin hiiriä, kipeitä lehmiä y.m. varten. Tätä
kiellettyä tavaraa siihen aikaan jokainen kiertävä kauppamies kuletti
mukanaan suuret määrät.

Ja sitte saimme me kaupantekijäisiksi nähdä laatikkojen kaiken


ihanuuden, kun Lassi jolloinkin levätessään tarkasteli ja järjesteli
varastojaan. Jaska ja emäntä muistivat Lassin jo niiltä ajoilta kun hän
kulki ympäri laukku selässä. Silloinkin jo myi hän monenlaista
tavaraa; nyt kun hänellä oli hevonen ja vankkurit, oli hänen
varastonsa oikein suuremmoinen.

Jos emäntä parhaansa mukaan hoiteli Lassia, tuhlasin minä yhtä


itsekkäästä syystä hellimmän huolenpitoni Pollelle. Minä su'in ja
harjasin sitä, sekotin täysin kourin jauhoja sen silppuun ja varastin
sille emännän parhaimpia vasikanheiniä. Kaksikymmentäviisi äyriä
oli vähin määrä, minkä Lassi minulle antoi juomarahaksi ja
viimeisenä jouluna kun olin Pohjoistalossa sain pienen, korean
pumpulikaulaliinan, joka oli vähintäin kuutta loistavaa väriä.
Vakuutan, ettei mikään korukalu koko elämässäni, ei edes
vaasantähti, ole tuottanut minulle niin suurta iloa kuin tämä huivi.

Mutta vielä suurempi palkinto odotti minua.

Huolenpitoni Pollesta tuli yhä enemmän huomatuksi. Sain myöskin


auttaa tavaroiden sisälle kantamisessa ja pakkaamisessa, enkä kait
osoittautunut aivan tyhmäksi siinä toimessa.

Kesällä sen jälkeen kun olin päässyt ripille, tuli kauppa-Lassi


meille heinäkuussa. Hän näytti väsyneeltä.

"No, mitäs kuuluu?" kysyi Jaska.


"Kiitos vaan, hiljalleenhan menee, mutta alkaa käydä hiukan
rasittavaksi kantaa retuuttaa noita laatikoita ja hypellä veräjiä
aukasemassa ja hoitaa hevosta. Täytän kuuskymmentä Mikon
päivänä."

Tuli hiljaisuus hetkeksi, ja sitte jatkoi Lassi:

"Otan silloin tällöin itselleni pojan apulaiseksi pariksi päiväksi,


missä on paljo veräjiä ja portteja tiellä; mutta tarvitsisinpa melkein
alituisen apulaisen."

Sinä rakas, rakas ukko! Sydän lensi kurkkuuni. Jospa tietäisit…


mutta enhän minä uskaltanut…

Seuraavana aamuna kysyi Lassi äkkiä:

"Ettekö te tahdo antaa minulle tuota huutopoikaanne apulaiseksi,


Jaska?"

Pistin neljä sormea suuhuni, jotten kirkasisi ilosta.

"Hm….minulla on.. .meneppäs ulos, poika!"

Minä menin, mutt'en tietystikään kauemmaksi kuin toiselle puolelle


tuvan ovea, jonka avainreikään sovitin korvani. Soimatkoon minua
tästä joka haluaa.

Ja nyt minä oikein sain kuulla, kuinka suuren arvoinen nuori mies
minä olin talossa. En ihmettele, ett'ei Jaska tahtonut tehdä nuorta
mieltäni itserakkaaksi kaikella tuolla ylistyksellä.

Olin melkein suuren rengin veroinen. Osasin tehdä kaikkea, olin


tottelevainen ja järjestystä harrastava. Ja sitte sai hän minusta
kolmekymmentä kruunua vaivaishoitohallitukselta.

"Vieläkö nytkin, kun hän on päässyt edes?" kysyi Lassi.

"Totta tosiaan, vielä vuoden ajan."

Siinä Pohjosen Jaska rohkeasti pani omiaan, sillä viime vuodelta


ei hän enää saanut kuin viisitoista kruunua, ja sekin vuosi loppui jo
kahden viikon perästä. Olin vähällä syöstä sisään ja huutaa: "Sinä
valehtelet!" Mutta hiljaa, nyt puhui Lassi taas.

"Minä pidän pojasta. Paljonko tahdotte välirahoja, että hän saisi


seurata minua jo tänään?"

"Kellekään muulle en minä häntä antaisi mistään hinnasta


maailmassa, mutta tehdäkseni Anderssonille palveluksen, annan
pojan hänelle viidestäkymmenestä kruunusta."

"Oletteko te aivan rutihullu, Jaska? Komean hamekankaan Liisa


muorille annan, enkä mitään muuta."

"Hiis vieköön, jos annan alle neljänkymmenen viiden", arveli


Jaska.

Kauppa-Lassi nousi ja napitti kiinni päällystakkinsa. Hän oli aivan


valmis lähtemään. Tarttuessaan ovenripaan sanoi hän:

"Hyvä hamekangas, kuusi nenäliinaa, saippuaa ja puoli luotia


rotansokuria, niin on kauppa valmis, mutt'ei nuppineulaakaan
enempää; on niitä poikia maailmassa, muuallakin."

Jollei Jaska nyt olisi myöntynyt, olisin minä, niin paljo kuin häntä
pelkäsinkin, syössyt sisään ja itse sekaantunut leikkiin. Mutta Jaska
hellitti purjeitaan ja sanoi:

"Ei niin kiivaasti, Andersson. Saakoon hän Jumalan nimessä pojan


siitä kuin on tarjonnut, vaikka se on minulle suuri vahinko, ja vaikka
pidän pojasta kuin olisi hän omia lapsiani."

Niin olin minä siis "myyty" toisen kerran elämässäni! Mutta olin
kuitenkin oikein iloinen. Herra Jumala, nythän minusta maksettiin.

Tunnin kuluttua istuin minä perimmäisellä tavaralaatikolla kauppa-


Lassin vankkureissa. Aurinko paistoi, koko luonto hymyili ja minun
sisässäni soi ja helisi riemu. Minulla oli suuri työ pitää itseäni
tyynenä. Mutta mäissä, kun Pollen kuormaa keventääksemme
kävelimme, hyppelin minä korkealle ilmaan rajussa ilossani. Päästä
ulos maailmaan, matkustaa seudusta seutuun, nähdä uusia ihmisiä
joka päivä, hoitaa ystävääni Pollea, olla kaukana likavesisaavista,
syödä Lassin hyvästä eväsvakasta eikä milloinkaan enää tarvita
mennä puhteella riihtä puimaan!
IV.

Kauppa-Lassi ja minä.

Minun täytyy esittää teille uudet ystäväni, isäntäni ja toverini,


kauppa-Lassi ja Polle. Vielä näin monen vuoden perästä voin nähdä
heidät edessäni, milloin tahdon, esim. sellaisina kun he olivat
kolmisin kiivetessämme jotakin vastamäkeä ylöspäin. Kauppa-Lassi
oli nyt vanhoilla päivillään hieman köyryselkäinen, pari tuumaa
keskimittaa lyhyempi, mutta lujatekoinen ja tukeva varreltaan.
Tasaisen lihavaa ruumista peitti huonosti istuva, karkeasta
harmaasta verasta tehty päällysnuttu, ja suuret jalat upposivat vielä
paljo suurempiin karkeisiin rasvanahkasaappaisiin, joiden varret
ulottuivat hyvän matkaa polvien yläpuolelle. Sai olla ainakin 25
astetta lämmintä varjossa, ennenkuin Lassin päähän pisti matkalla
heittää päällystakki pois, ja kevyempiä jalkineita hän ei käyttänyt
koskaan. Talvisin oli hänellä sudennahkaturkit, karva ulospäin.
Karkean takin kauluksen yli kohosivat pyöreät, hyväntahtoisen ja
hyvinvoivan näköiset kasvot, ja suuri pää, jonka runsas, vaalea
tukkapeite leikattiin vanhanaikaisella tavalla tasaiseksi yltympäri, niin
että tukan alareuna suuresti muistutti olkikaton räystästä. Parta ja
viikset olivat punaiset, hiukan harmaita karvoja joukossa, ja nenä oli
karkeatekoinen ja paksu. Mutta siniset silmät, suuret, älyä ja
hyvyyttä loistavat silmät loivat valonsa yli kasvojen, yli koko
ruumiinkin, kuten kesä-aurinko kultaa karua maisemaa, ja kauvaa ei
ollut kauppa-Lassin kanssa puhunut ja kuunnellut hänen pehmeätä
ja ystävällistä ääntänsä, ennenkuin jo piti hänestä. Hän voi olla
iloinenkin iloisten joukossa, laskea leikkiä ja jutella, kaikella
varovaisuudella ottaa lasin silloin tällöin; mutta minä, joka paremmin
tunsin hänet, tiesin kuitenkin hyvin, että jokin painoi hänen
mieltänsä, jokin, joka ei koskaan kokonaan väistynyt, ja kyllä hän
tätä jotakin, ei vaan kauppa-asioitansa, tuumiskeli, kun hän väliin
hiljaa ja liikkumatta istui tuntikausia kuormalla, imeskellen
piippunysäänsä ja katsella tuijottaen eteensä, mäkiä ja metsiä,
peltoja ja järvenrantoja, näkemättä kuitenkaan kaikesta juuri mitään.

Paljo hänestä pidettiin joka paikassa minne vaan tulimme hänen


parikymmentä neliöpenikulmaa käsittävällä liike-alallaan. Etenkin oli
hän naisväen suosikki. Kun hänen mehevä "Hyvää päivää!" kuultiin
pihalla, seisahtui rukki, ja navettapiika kääntyi takasin navetantieltä,
ja pikkutytöt nauroivat ja koputtelivat puukenkiään porstuassa ja
pistivät kaikki sormet suuhun ja katselivat pörröisen tukan alta
kauppa-Lassia noiden "karamöllien" suloisessa esimaussa, joilla
kauppa-Lassi aina kestitsi tuvan pikkuväkeä. Ennenkuin isäntä itse
ehti heittää kirveen kädestään ja marssia puuliiteristä sisään ja
sanoa: "Katsohan vaan, Andersson ulkona matkoilla! Tervetuloa
meidän taloon!" olivat sekä kahvipannu että vohvelirauta tulella.

Sellaisissa kelpopaikoissa kului hyvä aika, ennenkuin Lassi alkoi


puhua kaupoista. Ensin täytyi hänen tietää, kuinka vanhaemäntä
jaksoi, ja oliko lehmä, joka hänen viimeksi täällä käydessään oli
saanut perunan kurkkuunsa, jo parantunut, ja kuinka hevoskaupat
olivat luonnistaneet. Sitten hän hetken oltuaan vaiti saattoi sanoa:

You might also like